diff options
author | 2018-09-05 17:42:22 +0000 | |
---|---|---|
committer | 2018-09-05 17:42:22 +0000 | |
commit | a1140e2490ae560b3f85e8e2a4e424badaae1c48 (patch) | |
tree | 4bf6d22434f27cb61e0bcbc7fcfa6206dd02c08e /ms/controllerblueprints/modules/service/src/test/java/org/onap | |
parent | c77ee2f8cf2f326fd59a977f7f2775429cbce683 (diff) |
Controller Blueprints Microservice
Modify Model Type and Resource Defintions persistance and access from String to JSON type for easy handling.
Change-Id: Icfe7e95abad715b0ccad16c681ed057d289a6229
Issue-ID: CCSDK-431
Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'ms/controllerblueprints/modules/service/src/test/java/org/onap')
2 files changed, 5 insertions, 2 deletions
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRestTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRestTest.java index 8e88f0a69..c28abe2d3 100644 --- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRestTest.java +++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRestTest.java @@ -22,6 +22,7 @@ import org.junit.runner.RunWith; import org.junit.runners.MethodSorters;
import org.onap.ccsdk.apps.controllerblueprints.TestApplication;
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants;
+import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
import org.onap.ccsdk.apps.controllerblueprints.service.domain.ModelType;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
@@ -64,7 +65,7 @@ public class ModelTypeRestTest { modelType.setDefinitionType(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE);
modelType.setDerivedFrom(BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT);
modelType.setDescription("Definition for Sample Datatype ");
- modelType.setDefinition(content);
+ modelType.setDefinition(JacksonUtils.jsonNode(content));
modelType.setModelName(modelName);
modelType.setVersion("1.0.0");
modelType.setTags("test-datatype ," + BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT + ","
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java index 8bb1f0b89..82346954c 100644 --- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java +++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java @@ -24,6 +24,8 @@ import org.junit.Test; import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.onap.ccsdk.apps.controllerblueprints.TestApplication;
+import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
+import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition;
import org.onap.ccsdk.apps.controllerblueprints.service.domain.ResourceDictionary;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
@@ -58,7 +60,7 @@ public class ResourceDictionaryRestTest { ResourceDictionary dataDictionary = new ResourceDictionary();
dataDictionary.setResourcePath("test/vnf/ipaddress");
dataDictionary.setName("test-name");
- dataDictionary.setDefinition(definition);
+ dataDictionary.setDefinition(JacksonUtils.readValue(definition, ResourceDefinition.class));
dataDictionary.setValidValues("127.0.0.1");
dataDictionary.setResourceType("ONAP");
dataDictionary.setDataType("string");
|