From 51d9bb17422ae08042971e9cb87bd6a2576a5cdb Mon Sep 17 00:00:00 2001 From: liamfallon Date: Sun, 1 Dec 2019 21:44:47 +0000 Subject: Unit/SONAR/Checkstyle in ONAP-REST Util package of ONAP-REST, with JUnit added and SONAR/Checkstyle issues addressed. Coverage increased from 51% to 73% in large PolicyValidation class. Issue-ID: POLICY-2131 Change-Id: Iffa90e2dfa155d3e9cac114032fb9ca0df2cbab0 Signed-off-by: liamfallon --- .../policies/MicroServicePolicyContent0.json | 23 ++++++++++++++++++ .../policies/MicroServicePolicyContent1.json | 27 ++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 ONAP-REST/src/test/resources/policies/MicroServicePolicyContent0.json create mode 100644 ONAP-REST/src/test/resources/policies/MicroServicePolicyContent1.json (limited to 'ONAP-REST/src/test/resources/policies') diff --git a/ONAP-REST/src/test/resources/policies/MicroServicePolicyContent0.json b/ONAP-REST/src/test/resources/policies/MicroServicePolicyContent0.json new file mode 100644 index 000000000..f06d2f21c --- /dev/null +++ b/ONAP-REST/src/test/resources/policies/MicroServicePolicyContent0.json @@ -0,0 +1,23 @@ +{ + "police-instance-name": "content0", + "naming-models": [ + { + "naming-properties": [ + { + "property-value": "test", + "source-endpoint": "test", + "property-name": "testPropertyname", + "increment-sequence": { + "scope": "VNF", + "start-value": "1", + "length": "3", + "increment": "2" + }, + "source-system": "TOSCA" + } + ], + "naming-type": "testNamingType", + "naming-recipe": "testNamingRecipe" + } + ] +} diff --git a/ONAP-REST/src/test/resources/policies/MicroServicePolicyContent1.json b/ONAP-REST/src/test/resources/policies/MicroServicePolicyContent1.json new file mode 100644 index 000000000..dac78c0bb --- /dev/null +++ b/ONAP-REST/src/test/resources/policies/MicroServicePolicyContent1.json @@ -0,0 +1,27 @@ +{ + "police-instance-name": "content1", + "police-instance-range": "11", + "naming-models": [ + { + "naming-properties": [ + { + "property-value": "test", + "source-endpoint": "test", + "property-name": "testPropertyname", + "increment-sequence": { + "scope": "VNF", + "start-value": "1", + "length": "3", + "increment": "2" + }, + "source-system": "TOSCA" + } + ], + "naming-type": "testNamingType", + "naming-recipe": "testNamingRecipe" + } + ], + "some-container": { + "container-name": "container-value" + } +} -- cgit