aboutsummaryrefslogtreecommitdiffstats
path: root/models-base/src/test/java/org/onap
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2020-03-19 15:28:49 +0000
committerliamfallon <liam.fallon@est.tech>2020-03-19 15:32:54 +0000
commit13a3cdebc5885440ea28f021f5cd6bd3ecac389e (patch)
tree9cb2c574fdf77172798b73cf5b161105a614d499 /models-base/src/test/java/org/onap
parent3a2564106ca6b3c01142f15d629c3289cad7b8ca (diff)
Allow fetch of old policy type verisons
Due to the problems with TOSCA and version handling, the filtering for policy types on old versions did not work. This change fixes that problem. Issue-ID: POLICY-2377 Change-Id: I462bd5710b9dea37475861d1021d28b2c7391a24 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-base/src/test/java/org/onap')
-rw-r--r--models-base/src/test/java/org/onap/policy/models/base/PfConceptContainerTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/models-base/src/test/java/org/onap/policy/models/base/PfConceptContainerTest.java b/models-base/src/test/java/org/onap/policy/models/base/PfConceptContainerTest.java
index 8234741f6..a00363627 100644
--- a/models-base/src/test/java/org/onap/policy/models/base/PfConceptContainerTest.java
+++ b/models-base/src/test/java/org/onap/policy/models/base/PfConceptContainerTest.java
@@ -216,6 +216,15 @@ public class PfConceptContainerTest {
assertEquals(dacMap.get(NAME2), outMapList.get(2).get(NAME2));
assertEquals(dacMap.get(NAME3), outMapList.get(2).get(NAME3));
+ List<DummyAuthorativeConcept> outConceptList = container.toAuthorativeList();
+ assertEquals("Hello", outConceptList.get(0).getDescription());
+ assertEquals("Hi", outConceptList.get(1).getDescription());
+ assertEquals("Howdy", outConceptList.get(2).getDescription());
+ assertEquals("Ciao", outConceptList.get(3).getDescription());
+ assertEquals("name4", outConceptList.get(4).getName());
+ assertEquals("1.2.3", outConceptList.get(4).getVersion());
+ assertEquals("0.0.0", outConceptList.get(5).getVersion());
+
DummyBadPfConceptContainer badContainer = new DummyBadPfConceptContainer();
assertThatThrownBy(() -> badContainer.fromAuthorative(authorativeList))
.hasMessage("failed to instantiate instance of container concept class");