diff options
author | liamfallon <liam.fallon@est.tech> | 2019-05-05 21:26:36 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2019-05-05 21:26:36 +0000 |
commit | d3394bba7c8e30073a1f7874fed4320be18545d0 (patch) | |
tree | 91a4fdb7e81896b902204f15c110e40b653f1d9c /models-tosca/src/test/java/org/onap | |
parent | 8039c0bae81eb34b397e389573aa83168aa350b5 (diff) |
Serializaiton of properties to DB as JSON
Properties should be serialized to JSON prior to writing to database
and deserialized from JSON when read from database.
Issue-ID: POLICY-1736
Change-Id: I5ad3fd4a87079f4557f5fcb825395f0b4bec3318
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-tosca/src/test/java/org/onap')
2 files changed, 2 insertions, 2 deletions
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicyTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicyTest.java index 571cde485..ae38ab916 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicyTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicyTest.java @@ -81,7 +81,7 @@ public class JpaToscaPolicyTest { JpaToscaPolicy tp = new JpaToscaPolicy(tpKey, ptKey); Map<String, String> propertyMap = new HashMap<>(); - propertyMap.put("Property", "Property Value"); + propertyMap.put("Property", "\"Property Value\""); tp.setProperties(propertyMap); assertEquals(propertyMap, tp.getProperties()); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaServiceTemplateTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaServiceTemplateTest.java index 4569d42ff..a2a418ef9 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaServiceTemplateTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaServiceTemplateTest.java @@ -157,7 +157,7 @@ public class JpaToscaServiceTemplateTest { tst.clean(); assertEquals(tttClone0, tst); - assertFalse(new JpaToscaServiceTemplate().validate(new PfValidationResult()).isValid()); + assertTrue(new JpaToscaServiceTemplate().validate(new PfValidationResult()).isValid()); assertTrue(tst.validate(new PfValidationResult()).isValid()); tst.setDescription(null); |