summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service/src/test
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-09-13 14:25:49 +0000
committerMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-09-13 14:25:49 +0000
commit031164be51b84748fa07e6a51c961be055dd169e (patch)
treee3395cb752110fa09872cf1ca6ef534cd62776b9 /ms/controllerblueprints/modules/service/src/test
parent99f4a1e766cf27d35fb7b68b4904d1e49e7fa787 (diff)
Controller Blueprints Microservice
Optimise dictionary dummy data creation reusability and property usage optimisation. Change-Id: Ibbd56d514f437f29943cebc0e607becb6798e4b6 Issue-ID: CCSDK-491 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'ms/controllerblueprints/modules/service/src/test')
-rw-r--r--ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/ResourceAssignmentEnhancerServiceTest.java8
-rw-r--r--ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidationTest.java7
2 files changed, 6 insertions, 9 deletions
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/ResourceAssignmentEnhancerServiceTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/ResourceAssignmentEnhancerServiceTest.java
index e279ec9c0..a5d1e417e 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/ResourceAssignmentEnhancerServiceTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/ResourceAssignmentEnhancerServiceTest.java
@@ -26,9 +26,9 @@ import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate;
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonReactorUtils;
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment;
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory;
import org.onap.ccsdk.apps.controllerblueprints.resource.dict.service.ResourceDefinitionFileRepoService;
import org.onap.ccsdk.apps.controllerblueprints.resource.dict.service.ResourceDefinitionRepoService;
+import org.onap.ccsdk.apps.controllerblueprints.resource.dict.utils.ResourceDictionaryTestUtils;
import java.util.List;
@@ -42,10 +42,8 @@ public class ResourceAssignmentEnhancerServiceTest {
@Before
public void setUp(){
- ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("db", "source-db");
- ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("input", "source-input");
- ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("default", "source-default");
- ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("mdsal", "source-rest");
+ // Setup dummy Source Instance Mapping
+ ResourceDictionaryTestUtils.setUpResourceSourceMapping();
}
@Test
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidationTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidationTest.java
index 5f34b5510..26fb1d321 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidationTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidationTest.java
@@ -24,6 +24,7 @@ import org.junit.Test;
import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate;
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
import org.onap.ccsdk.apps.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory;
+import org.onap.ccsdk.apps.controllerblueprints.resource.dict.utils.ResourceDictionaryTestUtils;
import org.onap.ccsdk.apps.controllerblueprints.service.utils.ConfigModelUtils;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
@@ -37,10 +38,8 @@ public class ServiceTemplateValidationTest {
@Before
public void setUp(){
- ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("db", "source-db");
- ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("input", "source-input");
- ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("default", "source-default");
- ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("mdsal", "source-rest");
+ // Setup dummy Source Instance Mapping
+ ResourceDictionaryTestUtils.setUpResourceSourceMapping();
}
@Test