summaryrefslogtreecommitdiffstats
path: root/models-tosca/src/test/java/org
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2020-01-10 13:57:29 +0000
committerliamfallon <liam.fallon@est.tech>2020-01-10 13:57:34 +0000
commit39faa708e1f4e34930171dfcbd23876fe5c274e1 (patch)
treef6f9c364e4666bf6152c087fc63f9d37a082e2c4 /models-tosca/src/test/java/org
parenta3771d2efbf906cc4bf58683d4b2f40637d63ced (diff)
Fix policy-models to support data type properties
Data type properties are not being stored correctly into the database when MariaDB is used (it worked fine in unit tests in H2). Issue-ID: POLICY-2315 Change-Id: Ia901a070292b338154f3766f5fc7b91d656038df Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-tosca/src/test/java/org')
-rw-r--r--models-tosca/src/test/java/org/onap/policy/models/tosca/utils/ToscaUtilsTest.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/utils/ToscaUtilsTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/utils/ToscaUtilsTest.java
index ebe01a65c..9b8eff13e 100644
--- a/models-tosca/src/test/java/org/onap/policy/models/tosca/utils/ToscaUtilsTest.java
+++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/utils/ToscaUtilsTest.java
@@ -47,7 +47,7 @@ public class ToscaUtilsTest {
assertFalse(ToscaUtils.doDataTypesExist(jpaToscaServiceTemplate));
assertEquals("no data types specified on service template",
- ToscaUtils.checkDataTypesExist().check(jpaToscaServiceTemplate));
+ ToscaUtils.checkDataTypesExist().apply(jpaToscaServiceTemplate));
assertThatThrownBy(() -> {
ToscaUtils.assertDataTypesExist(jpaToscaServiceTemplate);
}).hasMessage("no data types specified on service template");
@@ -56,7 +56,7 @@ public class ToscaUtilsTest {
assertFalse(ToscaUtils.doDataTypesExist(jpaToscaServiceTemplate));
assertEquals("list of data types specified on service template is empty",
- ToscaUtils.checkDataTypesExist().check(jpaToscaServiceTemplate));
+ ToscaUtils.checkDataTypesExist().apply(jpaToscaServiceTemplate));
assertThatThrownBy(() -> {
ToscaUtils.assertDataTypesExist(jpaToscaServiceTemplate);
}).hasMessage("list of data types specified on service template is empty");
@@ -64,7 +64,7 @@ public class ToscaUtilsTest {
jpaToscaServiceTemplate.getDataTypes().getConceptMap().put(new PfConceptKey(), null);
assertTrue(ToscaUtils.doDataTypesExist(jpaToscaServiceTemplate));
- assertEquals(null, ToscaUtils.checkDataTypesExist().check(jpaToscaServiceTemplate));
+ assertEquals(null, ToscaUtils.checkDataTypesExist().apply(jpaToscaServiceTemplate));
assertThatCode(() -> {
ToscaUtils.assertDataTypesExist(jpaToscaServiceTemplate);
}).doesNotThrowAnyException();
@@ -77,7 +77,7 @@ public class ToscaUtilsTest {
assertFalse(ToscaUtils.doPolicyTypesExist(jpaToscaServiceTemplate));
assertEquals("no policy types specified on service template",
- ToscaUtils.checkPolicyTypesExist().check(jpaToscaServiceTemplate));
+ ToscaUtils.checkPolicyTypesExist().apply(jpaToscaServiceTemplate));
assertThatThrownBy(() -> {
ToscaUtils.assertPolicyTypesExist(jpaToscaServiceTemplate);
}).hasMessage("no policy types specified on service template");
@@ -86,7 +86,7 @@ public class ToscaUtilsTest {
assertFalse(ToscaUtils.doPolicyTypesExist(jpaToscaServiceTemplate));
assertEquals("list of policy types specified on service template is empty",
- ToscaUtils.checkPolicyTypesExist().check(jpaToscaServiceTemplate));
+ ToscaUtils.checkPolicyTypesExist().apply(jpaToscaServiceTemplate));
assertThatThrownBy(() -> {
ToscaUtils.assertPolicyTypesExist(jpaToscaServiceTemplate);
}).hasMessage("list of policy types specified on service template is empty");
@@ -94,7 +94,7 @@ public class ToscaUtilsTest {
jpaToscaServiceTemplate.getPolicyTypes().getConceptMap().put(new PfConceptKey(), null);
assertTrue(ToscaUtils.doPolicyTypesExist(jpaToscaServiceTemplate));
- assertEquals(null, ToscaUtils.checkPolicyTypesExist().check(jpaToscaServiceTemplate));
+ assertEquals(null, ToscaUtils.checkPolicyTypesExist().apply(jpaToscaServiceTemplate));
assertThatCode(() -> {
ToscaUtils.assertPolicyTypesExist(jpaToscaServiceTemplate);
}).doesNotThrowAnyException();
@@ -106,7 +106,7 @@ public class ToscaUtilsTest {
assertFalse(ToscaUtils.doPoliciesExist(jpaToscaServiceTemplate));
assertEquals("topology template not specified on service template",
- ToscaUtils.checkPoliciesExist().check(jpaToscaServiceTemplate));
+ ToscaUtils.checkPoliciesExist().apply(jpaToscaServiceTemplate));
assertThatThrownBy(() -> {
ToscaUtils.assertPoliciesExist(jpaToscaServiceTemplate);
}).hasMessage("topology template not specified on service template");
@@ -115,7 +115,7 @@ public class ToscaUtilsTest {
assertFalse(ToscaUtils.doPoliciesExist(jpaToscaServiceTemplate));
assertEquals("no policies specified on topology template of service template",
- ToscaUtils.checkPoliciesExist().check(jpaToscaServiceTemplate));
+ ToscaUtils.checkPoliciesExist().apply(jpaToscaServiceTemplate));
assertThatThrownBy(() -> {
ToscaUtils.assertPoliciesExist(jpaToscaServiceTemplate);
}).hasMessage("no policies specified on topology template of service template");
@@ -124,7 +124,7 @@ public class ToscaUtilsTest {
assertFalse(ToscaUtils.doPoliciesExist(jpaToscaServiceTemplate));
assertEquals("list of policies specified on topology template of service template is empty",
- ToscaUtils.checkPoliciesExist().check(jpaToscaServiceTemplate));
+ ToscaUtils.checkPoliciesExist().apply(jpaToscaServiceTemplate));
assertThatThrownBy(() -> {
ToscaUtils.assertPoliciesExist(jpaToscaServiceTemplate);
}).hasMessage("list of policies specified on topology template of service template is empty");
@@ -132,7 +132,7 @@ public class ToscaUtilsTest {
jpaToscaServiceTemplate.getTopologyTemplate().getPolicies().getConceptMap().put(new PfConceptKey(), null);
assertTrue(ToscaUtils.doPoliciesExist(jpaToscaServiceTemplate));
- assertEquals(null, ToscaUtils.checkPoliciesExist().check(jpaToscaServiceTemplate));
+ assertEquals(null, ToscaUtils.checkPoliciesExist().apply(jpaToscaServiceTemplate));
assertThatCode(() -> {
ToscaUtils.assertPoliciesExist(jpaToscaServiceTemplate);
}).doesNotThrowAnyException();