summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src/test/java
diff options
context:
space:
mode:
authorAvinashS <avinash.s@huawei.com>2017-09-18 12:55:57 +0000
committerAvinashS <avinash.s@huawei.com>2017-09-18 12:55:57 +0000
commit56c184e1622436654d9f12b1098a8020a6323a3a (patch)
tree67f89f9d4ca05e958c496be103bf91a6e6b4a270 /csarvalidation/src/test/java
parentd77a91e05fe1f2da7059e8cc1a5d41a804691e13 (diff)
Instantiate validation with path
To populate csar files during object creation. Change-Id: I66b5cf8b46f98990240e9cc470eff6a8874f3de0 IssueId: VNFSDK-90 Signed-off-by: AvinashS <avinash.s@huawei.com>
Diffstat (limited to 'csarvalidation/src/test/java')
-rw-r--r--csarvalidation/src/test/java/org/onap/validation/csarvalidationtest/CsarParserTest.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/csarvalidation/src/test/java/org/onap/validation/csarvalidationtest/CsarParserTest.java b/csarvalidation/src/test/java/org/onap/validation/csarvalidationtest/CsarParserTest.java
index 4c692e7..ce9ba5b 100644
--- a/csarvalidation/src/test/java/org/onap/validation/csarvalidationtest/CsarParserTest.java
+++ b/csarvalidation/src/test/java/org/onap/validation/csarvalidationtest/CsarParserTest.java
@@ -25,7 +25,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class CsarParserTest {
- CsarParser csarParser = new CsarParser();
+
String regex = "^\\/[a-zA-Z]\\:\\/";
ClassLoader classLoader = getClass().getClassLoader();
Pattern pattern = Pattern.compile(regex);
@@ -33,10 +33,10 @@ public class CsarParserTest {
Matcher matcher = pattern.matcher(configFile);
String dir2 = "/"+configFile.substring(1);
+ CsarParser csarParser = new CsarParser(dir2);
+
@Test
public void testValidateCsarMeta() {
- boolean result1 = csarParser.csarExtract(dir2);
- // assertEquals(true, result = true);
boolean result = CsarParser.validateCsarMeta();
assertEquals(true, result == true);
System.out.println("inside testValidateCsarMeta : " + result);
@@ -51,7 +51,6 @@ public class CsarParserTest {
@Test
public void testValidateToscaMeta() {
- boolean result1 = csarParser.csarExtract(dir2);
boolean result = csarParser.validateToscaMeta();
assertEquals(true, result == true);
System.out.println("inside testValidateToscaMeta : " + result);