aboutsummaryrefslogtreecommitdiffstats
path: root/context/context-management/src/test
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-10-04 07:06:41 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-10-04 16:44:57 +0100
commitb213e23edf68d36b4c0984d94d38d444f96949e2 (patch)
treebd7b60df8e8220abe93094fbbe373bc9c19791d0 /context/context-management/src/test
parent16a8f59fed2e53b1bbedaf65a33165bb4d3225f8 (diff)
Fix creation of sub Avro items
When an Avro object is created, nested sub avro objects are not created automatically. This change allows invocation of a method to create sub objects of Avro objects. Issue-ID: POLICY-954 Change-Id: Ie510867f2631ba6a8c6f5452c08aef5db67e8997 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'context/context-management/src/test')
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperInstanceCreationTest.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperInstanceCreationTest.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperInstanceCreationTest.java
index 800a7011d..14d44ee8b 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperInstanceCreationTest.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperInstanceCreationTest.java
@@ -96,7 +96,6 @@ public class JavaSchemaHelperInstanceCreationTest {
}
assertEquals(true, schemaHelper0.createNewInstance("true"));
-
try {
schemaHelper1.createNewInstance();
fail("this test should throw an exception here");
@@ -108,5 +107,12 @@ public class JavaSchemaHelperInstanceCreationTest {
assertEquals("", schemaHelper2.createNewInstance());
assertEquals("true", schemaHelper2.createNewInstance("true"));
+
+ try {
+ schemaHelper1.createNewSubInstance("SomeSubtype");
+ fail("this test should throw an exception here");
+ } catch (final Exception e) {
+ assertEquals("sub types are not supported on this schema helper", e.getMessage());
+ }
}
}