From 73ba8039930ba56f6a64a7acc4126dc50b77070d Mon Sep 17 00:00:00 2001 From: liamfallon Date: Mon, 30 Jul 2018 10:22:27 +0100 Subject: Improve validation, add hierarchical validation Parameter validaiton updated to generically support nested groups of parameters, and nested maps of parameters. Unit test showing JSON parameter input added. Unit test showing YAML parameter inout added. Test parameter group classes moved into subdirectory This allows parameters to be unmarshaled seamlessly from JSON and YAML files. Change-Id: I768e11f31ee7f62299c4d5d95ab68a005d1aff16 Issue-ID: POLICY-922 Signed-off-by: liamfallon --- .../expectedValidationResults/TestParametersL0_2_Warning.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 common-parameters/src/test/resources/expectedValidationResults/TestParametersL0_2_Warning.txt (limited to 'common-parameters/src/test/resources/expectedValidationResults/TestParametersL0_2_Warning.txt') diff --git a/common-parameters/src/test/resources/expectedValidationResults/TestParametersL0_2_Warning.txt b/common-parameters/src/test/resources/expectedValidationResults/TestParametersL0_2_Warning.txt new file mode 100644 index 00000000..33d1d16a --- /dev/null +++ b/common-parameters/src/test/resources/expectedValidationResults/TestParametersL0_2_Warning.txt @@ -0,0 +1,9 @@ +parameter group "l0Parameters" type "org.onap.policy.common.parameters.testclasses.TestParametersL00" WARNING, parameter group has status WARNING + field "l00IntField" type "int" value "3" WARNING, values greater than 2 are not recommended + field "l00StringField" type "java.lang.String" value "l00StringField" WARNING, using the field name for the parameter value is dangerous + parameter group "l00L10Nested" type "org.onap.policy.common.parameters.testclasses.TestParametersL10" WARNING, parameter group has status WARNING + field "l10IntField" type "int" value "3" WARNING, values greater than 2 are not recommended + field "l10StringField" type "java.lang.String" value "l10StringField" WARNING, using the field name for the parameter value is dangerous + parameter group "l00LGenericNested" type "org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" WARNING, parameter group has status WARNING + field "lgenericIntField" type "int" value "3" WARNING, values greater than 2 are not recommended + field "lgenericStringField" type "java.lang.String" value "lgenericStringField" WARNING, using the field name for the parameter value is dangerous \ No newline at end of file -- cgit 1.2.3-korg