diff options
author | 2019-04-23 13:27:55 -0400 | |
---|---|---|
committer | 2019-04-24 13:07:50 -0400 | |
commit | cccfb11b59becaaf86adc4c88600bd70f2519b0d (patch) | |
tree | fbab9aabd089f0943a5bdbfd5a97e1fa80e674c4 /main/src/test/java/org/onap/policy/pap/main/rest/depundep/ProviderSuper.java | |
parent | a6cb1f27c8fe26b02abbd6a3fcf876ec306e6a5a (diff) |
Validate supported types3.0.2-ONAP
When a group is created, PAP should verify that the "supported types"
exist in the DB.
Address potential sonar issue.
Address potential sonar issue in similar block of code.
Change-Id: Ib830550bc37d4ebe42c8782f3f874e463f3f51c2
Issue-ID: POLICY-1688
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'main/src/test/java/org/onap/policy/pap/main/rest/depundep/ProviderSuper.java')
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/rest/depundep/ProviderSuper.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/depundep/ProviderSuper.java b/main/src/test/java/org/onap/policy/pap/main/rest/depundep/ProviderSuper.java index 256d3af0..2fca6848 100644 --- a/main/src/test/java/org/onap/policy/pap/main/rest/depundep/ProviderSuper.java +++ b/main/src/test/java/org/onap/policy/pap/main/rest/depundep/ProviderSuper.java @@ -48,6 +48,7 @@ import org.onap.policy.models.pdp.concepts.PdpStateChange; import org.onap.policy.models.pdp.concepts.PdpUpdate; import org.onap.policy.models.provider.PolicyModelsProvider; import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy; +import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyType; import org.onap.policy.pap.main.PapConstants; import org.onap.policy.pap.main.PolicyModelsProviderFactoryWrapper; import org.onap.policy.pap.main.comm.PdpModifyRequestMap; @@ -234,6 +235,16 @@ public class ProviderSuper { } /** + * Loads a policy type. + * + * @param fileName name of the file from which to load + * @return a policy type + */ + protected ToscaPolicyType loadPolicyType(String fileName) { + return loadFile(fileName, ToscaPolicyType.class); + } + + /** * Loads an object from a JSON file. * * @param fileName name of the file from which to load |