diff options
author | Ravi Mantena <rx908f@att.com> | 2020-12-21 11:31:55 -0500 |
---|---|---|
committer | Ravi Mantena <rx908f@att.com> | 2020-12-21 11:32:34 -0500 |
commit | a520d00e005db1b232b9dae0c70d4dc5d73b33e1 (patch) | |
tree | 9c0e16ce5fab9bc12da138c4d8c613bcff54516b /mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/test/OnapComponentSpecTest.java | |
parent | 2f551ba584dbb70568a69144b39e6da7c55c517f (diff) |
BpGen refactor Code Quality Issue-ID: DCAEGEN2-2502
Issue-ID: DCAEGEN2-2502
Change-Id: If6e08f0bb88c9039fb27898d50d2645f79175ba4
Signed-off-by: Ravi Mantena <rx908f@att.com>
Diffstat (limited to 'mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/test/OnapComponentSpecTest.java')
-rw-r--r-- | mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/test/OnapComponentSpecTest.java | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/test/OnapComponentSpecTest.java b/mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/test/OnapComponentSpecTest.java index 633c205..e610bd3 100644 --- a/mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/test/OnapComponentSpecTest.java +++ b/mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/test/OnapComponentSpecTest.java @@ -23,7 +23,6 @@ package org.onap.blueprintgenerator.test; - import org.onap.blueprintgenerator.exception.ComponentSpecException; import org.onap.blueprintgenerator.model.componentspec.base.ComponentSpec; import org.junit.Test; @@ -35,24 +34,35 @@ import static org.junit.Assert.assertEquals; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: ONAP - Blueprint Generator - * ONAP ComponentSpec Test Cases + * @date 10/16/2020 Application: ONAP - Blueprint Generator ONAP ComponentSpec Test Cases */ - public class OnapComponentSpecTest extends BlueprintGeneratorTests { + /** + * Test Case for ComponentSpec File Generation for Invalid File + * + */ @DisplayName("Testing ComponentSpec File Generation for Invalid File") @Test(expected = ComponentSpecException.class) public void testComponentSpecForInvalidFile() { onapComponentSpecService.createComponentSpecFromFile("invalid.json"); } + /** + * Test Case for ComponentSpec File Generation for Valid DMAAP Fil + * + */ @DisplayName("Testing ComponentSpec File Generation for Valid DMAAP File") @Test - public void testComponentSpecForValidVesFile(){ - ComponentSpec onapComponentSpec = onapComponentSpecService.createComponentSpecFromFile(Paths.get("src", "test", "resources", "componentspecs", ves).toFile().getAbsolutePath()); - assertEquals("ComponentSpec name not matching for Valid Ves File",onapComponentSpec.getSelf().getName(), "dcae-ves-collector"); + public void testComponentSpecForValidVesFile() { + ComponentSpec onapComponentSpec = + onapComponentSpecService.createComponentSpecFromFile( + Paths.get("src", "test", "resources", "componentspecs", ves) + .toFile() + .getAbsolutePath()); + assertEquals( + "ComponentSpec name not matching for Valid Ves File", + onapComponentSpec.getSelf().getName(), + "dcae-ves-collector"); } - } |