aboutsummaryrefslogtreecommitdiffstats
path: root/models-provider
diff options
context:
space:
mode:
Diffstat (limited to 'models-provider')
-rw-r--r--models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyPersistenceTest.java9
-rw-r--r--models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyToscaPersistenceTest.java8
2 files changed, 17 insertions, 0 deletions
diff --git a/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyPersistenceTest.java b/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyPersistenceTest.java
index 1f577ae21..8e0dcb31c 100644
--- a/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyPersistenceTest.java
+++ b/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyPersistenceTest.java
@@ -209,6 +209,15 @@ public class PolicyPersistenceTest {
databaseProvider.createPolicyTypes(toscaServiceTemplatePolicyType);
yamlObject = new Yaml().load(
+ ResourceUtils.getResourceAsString("policytypes/onap.policies.controlloop.operational.Common.yaml"));
+ yamlAsJsonString = new StandardCoder().encode(yamlObject);
+
+ toscaServiceTemplatePolicyType = standardCoder.decode(yamlAsJsonString, ToscaServiceTemplate.class);
+
+ assertNotNull(toscaServiceTemplatePolicyType);
+ databaseProvider.createPolicyTypes(toscaServiceTemplatePolicyType);
+
+ yamlObject = new Yaml().load(
ResourceUtils.getResourceAsString("policytypes/onap.policies.controlloop.guard.FrequencyLimiter.yaml"));
yamlAsJsonString = new StandardCoder().encode(yamlObject);
diff --git a/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyToscaPersistenceTest.java b/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyToscaPersistenceTest.java
index 9012d84b1..1aedcaf83 100644
--- a/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyToscaPersistenceTest.java
+++ b/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyToscaPersistenceTest.java
@@ -177,6 +177,14 @@ public class PolicyToscaPersistenceTest {
databaseProvider.createPolicyTypes(toscaServiceTemplatePolicyType);
yamlObject = new Yaml().load(
+ ResourceUtils.getResourceAsString("policytypes/onap.policies.controlloop.operational.Common.yaml"));
+ yamlAsJsonString = new StandardCoder().encode(yamlObject);
+
+ toscaServiceTemplatePolicyType = standardCoder.decode(yamlAsJsonString, ToscaServiceTemplate.class);
+
+ assertNotNull(toscaServiceTemplatePolicyType);
+ databaseProvider.createPolicyTypes(toscaServiceTemplatePolicyType);
+ yamlObject = new Yaml().load(
ResourceUtils.getResourceAsString("policytypes/onap.policies.controlloop.guard.FrequencyLimiter.yaml"));
yamlAsJsonString = new StandardCoder().encode(yamlObject);