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/JToscaImportTest.java64
-rw-r--r--src/test/resources/csars/resource-Spgw-csar-ZTE.csarbin31639 -> 0 bytes
-rw-r--r--src/test/resources/csars/sdc-onboarding_csar.csarbin80596 -> 0 bytes
3 files changed, 0 insertions, 64 deletions
diff --git a/src/test/java/org/openecomp/sdc/toscaparser/api/JToscaImportTest.java b/src/test/java/org/openecomp/sdc/toscaparser/api/JToscaImportTest.java
deleted file mode 100644
index c8a30fa..0000000
--- a/src/test/java/org/openecomp/sdc/toscaparser/api/JToscaImportTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.openecomp.sdc.toscaparser.api;
-
-import org.junit.Test;
-import org.openecomp.sdc.toscaparser.api.common.JToscaException;
-import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import static org.junit.Assert.assertEquals;
-
-public class JToscaImportTest {
-
- @Test
- public void testNoMissingTypeValidationError() throws JToscaException {
- String fileStr = JToscaImportTest.class.getClassLoader().getResource
- ("csars/sdc-onboarding_csar.csar").getFile();
- File file = new File(fileStr);
- new ToscaTemplate(file.getAbsolutePath(), null, true, null);
- List<String> missingTypeErrors = ThreadLocalsHolder.getCollector()
- .getValidationIssueReport()
- .stream()
- .filter(s -> s.contains("JE136"))
- .collect(Collectors.toList());
- assertEquals(0, missingTypeErrors.size());
- }
-
- @Test
- public void testNoStackOverFlowError() {
- Exception jte = null;
- try {
- String fileStr = JToscaImportTest.class.getClassLoader().getResource
- ("csars/sdc-onboarding_csar.csar").getFile();
- File file = new File(fileStr);
- new ToscaTemplate(file.getAbsolutePath(), null, true, null);
- } catch (Exception e){
- jte = e;
- }
- assertEquals(null, jte);
- }
-
- @Test
- public void testNoInvalidImports() throws JToscaException {
- List<String> fileNames = new ArrayList<>();
- fileNames.add("csars/tmpCSAR_Huawei_vSPGW_fixed.csar");
- fileNames.add("csars/sdc-onboarding_csar.csar");
- fileNames.add("csars/resource-Spgw-csar-ZTE.csar");
-
- for (String fileName : fileNames) {
- String fileStr = JToscaImportTest.class.getClassLoader().getResource(fileName).getFile();
- File file = new File(fileStr);
- new ToscaTemplate(file.getAbsolutePath(), null, true, null);
- List<String> invalidImportErrors = ThreadLocalsHolder.getCollector()
- .getValidationIssueReport()
- .stream()
- .filter(s -> s.contains("JE195"))
- .collect(Collectors.toList());
- assertEquals(0, invalidImportErrors.size());
- }
- }
-
-}
diff --git a/src/test/resources/csars/resource-Spgw-csar-ZTE.csar b/src/test/resources/csars/resource-Spgw-csar-ZTE.csar
deleted file mode 100644
index 58c3ddd..0000000
--- a/src/test/resources/csars/resource-Spgw-csar-ZTE.csar
+++ /dev/null
Binary files differ
diff --git a/src/test/resources/csars/sdc-onboarding_csar.csar b/src/test/resources/csars/sdc-onboarding_csar.csar
deleted file mode 100644
index e1c3267..0000000
--- a/src/test/resources/csars/sdc-onboarding_csar.csar
+++ /dev/null
Binary files differ