diff options
author | Singal, Kapil (ks220y) <ks220y@att.com> | 2020-09-22 12:16:46 -0400 |
---|---|---|
committer | Singal, Kapil (ks220y) <ks220y@att.com> | 2020-09-22 13:49:05 -0400 |
commit | 1072867dfac0df993cbd3e44bcc11a5cac7465fd (patch) | |
tree | 4a821659cf3b50cf946cbb535d528be8508e9fff /ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test | |
parent | d97021cd756d63402545fdc2e14ac7611c3da118 (diff) |
Enabling Code Formatter
Code Formatter was turned off due to java 11 migation
Issue-ID: CCSDK-2852
Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
Change-Id: I3d02ed3cc7a93d7551fe25356512cfe8db1517d8
Diffstat (limited to 'ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test')
4 files changed, 20 insertions, 12 deletions
diff --git a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinitionTest.java b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinitionTest.java index b8e1d519b..3e9965f5e 100644 --- a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinitionTest.java +++ b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinitionTest.java @@ -31,7 +31,8 @@ public class ResourceDefinitionTest { public void testDictionaryDefinitionInputSource() { String fileName = basePath + "/input-source.json"; - ResourceDefinition resourceDefinition = JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class); + ResourceDefinition resourceDefinition = + JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class); Assert.assertNotNull("Failed to populate dictionaryDefinition for input type", resourceDefinition); } @@ -39,7 +40,8 @@ public class ResourceDefinitionTest { public void testDictionaryDefinitionDefaultSource() { String fileName = basePath + "/default-source.json"; - ResourceDefinition resourceDefinition = JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class); + ResourceDefinition resourceDefinition = + JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class); Assert.assertNotNull("Failed to populate dictionaryDefinition for default type", resourceDefinition); } @@ -47,14 +49,16 @@ public class ResourceDefinitionTest { public void testDictionaryDefinitionDBSource() { String fileName = basePath + "/db-source.json"; - ResourceDefinition resourceDefinition = JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class); + ResourceDefinition resourceDefinition = + JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class); Assert.assertNotNull("Failed to populate dictionaryDefinition for processor-db type", resourceDefinition); } @Test public void testDictionaryDefinitionMDSALSource() { String fileName = basePath + "/mdsal-source.json"; - ResourceDefinition resourceDefinition = JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class); + ResourceDefinition resourceDefinition = + JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class); Assert.assertNotNull("Failed to populate dictionaryDefinition for mdsal type", resourceDefinition); } diff --git a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationServiceTest.kt b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationServiceTest.kt index 77af5dbe0..66df5078c 100644 --- a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationServiceTest.kt +++ b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationServiceTest.kt @@ -33,6 +33,7 @@ import org.slf4j.LoggerFactory class ResourceAssignmentValidationServiceTest { private val log = LoggerFactory.getLogger(ResourceAssignmentValidationServiceTest::class.java) + @Before fun setUp() { // Setup dummy Source Instance Mapping diff --git a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java index 30b4d4544..904dbc2c3 100644 --- a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java +++ b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java @@ -32,9 +32,10 @@ public class BulkResourceSequencingUtilsTest { @Test public void testProcess() { - List<ResourceAssignment> assignments = JacksonUtils.Companion.getListFromClassPathFile("validation/success.json", ResourceAssignment.class); + 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/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java index 8004d2ca2..862f1892d 100644 --- a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java +++ b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java @@ -50,26 +50,27 @@ public class ResourceDictionaryUtilsTest { resourceDefinition.setSources(sources); // To Check Empty Source ResourceDictionaryUtils.populateSourceMapping(resourceAssignment, resourceDefinition); - Assert.assertEquals("Expected Empty source Input, but.", ResourceDictionaryConstants.SOURCE_INPUT, resourceAssignment.getDictionarySource()); + Assert.assertEquals("Expected Empty source Input, but.", ResourceDictionaryConstants.SOURCE_INPUT, + resourceAssignment.getDictionarySource()); // To Check First Source resourceAssignment.setDictionarySource(null); sources.put(ResourceDictionaryConstants.SOURCE_DEFAULT, new NodeTemplate()); ResourceDictionaryUtils.populateSourceMapping(resourceAssignment, resourceDefinition); - Assert.assertEquals("Expected First source Default, but.", - ResourceDictionaryConstants.SOURCE_DEFAULT, + Assert.assertEquals("Expected First source Default, but.", ResourceDictionaryConstants.SOURCE_DEFAULT, resourceAssignment.getDictionarySource()); // To Check Assigned Source resourceAssignment.setDictionarySource(ResourceDictionaryConstants.PROCESSOR_DB); ResourceDictionaryUtils.populateSourceMapping(resourceAssignment, resourceDefinition); - Assert.assertEquals("Expected Assigned source DB, but.", ResourceDictionaryConstants.PROCESSOR_DB, resourceAssignment.getDictionarySource()); + Assert.assertEquals("Expected Assigned source DB, but.", ResourceDictionaryConstants.PROCESSOR_DB, + resourceAssignment.getDictionarySource()); } @Test public void testFindFirstSource() { - //To check if Empty Source + // To check if Empty Source Map<String, NodeTemplate> sources = new HashMap<>(); String firstSource = ResourceDictionaryUtils.findFirstSource(sources); Assert.assertNull("Source populated, which is not expected.", firstSource); @@ -82,7 +83,8 @@ public class ResourceDictionaryUtilsTest { // TO check the multiple Source sources.put(ResourceDictionaryConstants.PROCESSOR_DB, new NodeTemplate()); String multipleFirstSource = ResourceDictionaryUtils.findFirstSource(sources); - Assert.assertEquals("Expected source Input, but.", ResourceDictionaryConstants.SOURCE_INPUT, multipleFirstSource); + Assert.assertEquals("Expected source Input, but.", ResourceDictionaryConstants.SOURCE_INPUT, + multipleFirstSource); } |