diff options
Diffstat (limited to 'ms/controllerblueprints/modules/resource-dict/src/test')
4 files changed, 16 insertions, 10 deletions
diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinitionTest.java b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinitionTest.java index fd38db0bf..111476b5e 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinitionTest.java +++ b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinitionTest.java @@ -28,7 +28,7 @@ public class ResourceDefinitionTest { private String basePath = "./../../../../components/model-catalog/resource-dictionary/starter-dictionary"; @Test - public void testDictionaryDefinitionInputSource(){ + public void testDictionaryDefinitionInputSource() { String fileName = basePath + "/input-source.json"; ResourceDefinition resourceDefinition = JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class); @@ -36,7 +36,7 @@ public class ResourceDefinitionTest { } @Test - public void testDictionaryDefinitionDefaultSource(){ + public void testDictionaryDefinitionDefaultSource() { String fileName = basePath + "/default-source.json"; ResourceDefinition resourceDefinition = JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class); @@ -44,7 +44,7 @@ public class ResourceDefinitionTest { } @Test - public void testDictionaryDefinitionDBSource(){ + public void testDictionaryDefinitionDBSource() { String fileName = basePath + "/db-source.json"; ResourceDefinition resourceDefinition = JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class); @@ -52,9 +52,10 @@ public class ResourceDefinitionTest { } @Test - public void testDictionaryDefinitionMDSALSource(){ + public void testDictionaryDefinitionMDSALSource() { String fileName = basePath + "/mdsal-source.json"; ResourceDefinition resourceDefinition = JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class); Assert.assertNotNull("Failed to populate dictionaryDefinition for mdsal type", resourceDefinition); } + } diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationServiceTest.kt b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationServiceTest.kt index b891f9ec6..77af5dbe0 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationServiceTest.kt +++ b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationServiceTest.kt @@ -17,11 +17,11 @@ package org.onap.ccsdk.cds.controllerblueprints.resource.dict.service import org.junit.Assert +import org.junit.Before import org.junit.Test import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment -import org.junit.Before import org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils.ResourceDictionaryTestUtils import org.slf4j.LoggerFactory @@ -31,6 +31,7 @@ import org.slf4j.LoggerFactory * @author Brinda Santh */ class ResourceAssignmentValidationServiceTest { + private val log = LoggerFactory.getLogger(ResourceAssignmentValidationServiceTest::class.java) @Before fun setUp() { @@ -62,4 +63,4 @@ class ResourceAssignmentValidationServiceTest { val resourceAssignmentValidator = ResourceAssignmentValidationServiceImpl() resourceAssignmentValidator.validate(assignments!!) } -}
\ No newline at end of file +} diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java index 3413868ee..30b4d4544 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java +++ b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java @@ -20,7 +20,9 @@ import org.junit.Assert; import org.junit.Test; import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils; import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment; + import java.util.List; + /** * BulkResourceSequencingUtils. * @@ -29,9 +31,10 @@ import java.util.List; public class BulkResourceSequencingUtilsTest { @Test - public void testProcess(){ + public void testProcess() { List<ResourceAssignment> assignments = JacksonUtils.Companion.getListFromClassPathFile("validation/success.json", ResourceAssignment.class); Assert.assertNotNull("failed to get ResourceAssignment from validation/success.json ", assignments); BulkResourceSequencingUtils.process(assignments); } + }
\ No newline at end of file diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java index 16b02d86c..8004d2ca2 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java +++ b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java @@ -56,7 +56,9 @@ public class ResourceDictionaryUtilsTest { resourceAssignment.setDictionarySource(null); sources.put(ResourceDictionaryConstants.SOURCE_DEFAULT, new NodeTemplate()); ResourceDictionaryUtils.populateSourceMapping(resourceAssignment, resourceDefinition); - Assert.assertEquals("Expected First source Default, but.", ResourceDictionaryConstants.SOURCE_DEFAULT, resourceAssignment.getDictionarySource()); + Assert.assertEquals("Expected First source Default, but.", + ResourceDictionaryConstants.SOURCE_DEFAULT, + resourceAssignment.getDictionarySource()); // To Check Assigned Source resourceAssignment.setDictionarySource(ResourceDictionaryConstants.PROCESSOR_DB); @@ -91,9 +93,8 @@ public class ResourceDictionaryUtilsTest { ResourceDictionaryUtils.assignInputs(data, context); String path = BluePrintConstants.PATH_INPUTS.concat(BluePrintConstants.PATH_DIVIDER).concat("mapValue"); log.info("populated context {}", context); - Assert.assertTrue(String.format("failed to get variable : %s",path),context.containsKey(path)); + Assert.assertTrue(String.format("failed to get variable : %s", path), context.containsKey(path)); } - } |