diff options
Diffstat (limited to 'common-parameters/src/test/java/org/onap/policy/common/parameters/TestValidationErrors.java')
-rw-r--r-- | common-parameters/src/test/java/org/onap/policy/common/parameters/TestValidationErrors.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/TestValidationErrors.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/TestValidationErrors.java index 6b781472..a489cc3f 100644 --- a/common-parameters/src/test/java/org/onap/policy/common/parameters/TestValidationErrors.java +++ b/common-parameters/src/test/java/org/onap/policy/common/parameters/TestValidationErrors.java @@ -21,6 +21,7 @@ package org.onap.policy.common.parameters; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -31,6 +32,7 @@ import org.onap.policy.common.parameters.testclasses.ParameterGroupWithIllegalMa import org.onap.policy.common.parameters.testclasses.ParameterGroupWithIllegalMapValue; import org.onap.policy.common.parameters.testclasses.ParameterGroupWithNullCollection; import org.onap.policy.common.parameters.testclasses.ParameterGroupWithNullMapValue; +import org.onap.policy.common.parameters.testclasses.ParameterGroupWithNullSubGroup; import org.onap.policy.common.parameters.testclasses.ParameterGroupWithParameterGroupCollection; public class TestValidationErrors { @@ -69,6 +71,14 @@ public class TestValidationErrors { } @Test + public void testMapNullSubGroupValidation() { + ParameterGroupWithNullSubGroup nullSub = new ParameterGroupWithNullSubGroup("Null sub group value"); + + nullSub.isValid(); + assertNull(nullSub.getSubGroup()); + } + + @Test public void testMapNullValueValidation() { ParameterGroupWithNullMapValue nullMap = new ParameterGroupWithNullMapValue("Null Map value"); try { |