summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/openecomp/sdc/toscaparser/api/JToscaMetadataParse.java (renamed from src/test/java/org.openecomp.sdc.toscaparser/JToscaMetadataParse.java)19
-rw-r--r--src/test/resources/csars/tmpCSAR_Huawei_vSPGW_fixed.csar.csarbin0 -> 44576 bytes
2 files changed, 17 insertions, 2 deletions
diff --git a/src/test/java/org.openecomp.sdc.toscaparser/JToscaMetadataParse.java b/src/test/java/org/openecomp/sdc/toscaparser/api/JToscaMetadataParse.java
index 584a0fd..79d166f 100644
--- a/src/test/java/org.openecomp.sdc.toscaparser/JToscaMetadataParse.java
+++ b/src/test/java/org/openecomp/sdc/toscaparser/api/JToscaMetadataParse.java
@@ -1,14 +1,17 @@
-package org.openecomp.sdc.toscaparser;
+package org.openecomp.sdc.toscaparser.api;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
import java.io.File;
+import java.util.Collection;
import java.util.LinkedHashMap;
import org.junit.Test;
-import org.openecomp.sdc.toscaparser.api.ToscaTemplate;
import org.openecomp.sdc.toscaparser.api.common.JToscaException;
+import org.openecomp.sdc.toscaparser.api.common.JToscaValidationIssue;
+import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder;
public class JToscaMetadataParse {
@@ -23,4 +26,16 @@ public class JToscaMetadataParse {
assertNotNull(entryDefinition);
assertEquals("tosca_helloworld.yaml", entryDefinition);
}
+
+ @Test
+ public void noWarningsAfterParse() throws JToscaException {
+ String fileStr = JToscaMetadataParse.class.getClassLoader().getResource("csars/tmpCSAR_Huawei_vSPGW_fixed.csar.csar").getFile();
+ File file = new File(fileStr);
+ ToscaTemplate toscaTemplate = new ToscaTemplate(file.getAbsolutePath(), null, true, null);
+
+
+// Collection<JToscaValidationIssue> issues = ThreadLocalsHolder.getCollector().getValidationIssues().values();
+// assertTrue(issues.size() == 0 );
+ }
+
}
diff --git a/src/test/resources/csars/tmpCSAR_Huawei_vSPGW_fixed.csar.csar b/src/test/resources/csars/tmpCSAR_Huawei_vSPGW_fixed.csar.csar
new file mode 100644
index 0000000..70f8cc4
--- /dev/null
+++ b/src/test/resources/csars/tmpCSAR_Huawei_vSPGW_fixed.csar.csar
Binary files differ