aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2017-11-28 15:55:44 +0200
committerYuli Shlosberg <ys9693@att.com>2017-11-28 16:01:24 +0200
commitd5e341bc22977beac2cc2c9d4b9368245cefda3a (patch)
treed6f3defa0fe88071f29956e08b8b14cb6cfaddd3 /src/test
parentea45979501b62b3c1e9e02edfb7ded6779e85018 (diff)
add tests
Change-Id: Ifa5f6891a06d6bf5ae82d0dd73ee01aa60967afe Issue-ID: SDC-695 Signed-off-by: Yuli Shlosberg <ys9693@att.com>
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