aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-tosca-parser/src/test/java/org/openecomp/sdc/impl/ToscaParserTestSuite.java
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-tosca-parser/src/test/java/org/openecomp/sdc/impl/ToscaParserTestSuite.java')
-rw-r--r--sdc-tosca-parser/src/test/java/org/openecomp/sdc/impl/ToscaParserTestSuite.java56
1 files changed, 0 insertions, 56 deletions
diff --git a/sdc-tosca-parser/src/test/java/org/openecomp/sdc/impl/ToscaParserTestSuite.java b/sdc-tosca-parser/src/test/java/org/openecomp/sdc/impl/ToscaParserTestSuite.java
deleted file mode 100644
index 83e7d13..0000000
--- a/sdc-tosca-parser/src/test/java/org/openecomp/sdc/impl/ToscaParserTestSuite.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.openecomp.sdc.impl;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-
-import org.junit.BeforeClass;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper;
-import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException;
-import org.openecomp.sdc.tosca.parser.impl.SdcToscaParserFactory;
-import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector;
-import org.openecomp.sdc.toscaparser.api.common.JToscaException;
-
-@RunWith( Suite.class )
-@Suite.SuiteClasses( {
- ToscaParserNodeTemplateTest.class,
- ToscaParserSubsMappingsTest.class,
- ToscaParserGroupTest.class,
- ToscaParserMetadataTest.class,
- ToscaParserServiceInputTest.class,
-} )
-public class ToscaParserTestSuite {
-
- public static final String VF_CUSTOMIZATION_UUID = "56179cd8-de4a-4c38-919b-bbc4452d2d73";
- static SdcToscaParserFactory factory;
- static ISdcCsarHelper rainyCsarHelperSingleVf;
- static ISdcCsarHelper rainyCsarHelperMultiVfs;
- static ISdcCsarHelper fdntCsarHelper;
-
- @BeforeClass
- public static void init() throws SdcToscaParserException, JToscaException, IOException {
-
- factory = SdcToscaParserFactory.getInstance();
- fdntCsarHelper = getCsarHelper("csars/service-ServiceFdnt-with-allotted.csar");
- rainyCsarHelperMultiVfs = getCsarHelper("csars/service-ServiceFdnt-csar-rainy.csar");
- rainyCsarHelperSingleVf = getCsarHelper("csars/service-ServiceFdnt-csar.csar");
- }
-
- private static ISdcCsarHelper getCsarHelper(String path) throws JToscaException, IOException, SdcToscaParserException {
- System.out.println("Parsing CSAR "+path+"...");
- String fileStr1 = ToscaParserTestSuite.class.getClassLoader().getResource(path).getFile();
- File file1 = new File(fileStr1);
- ISdcCsarHelper sdcCsarHelper = factory.getSdcCsarHelper(file1.getAbsolutePath());
- ArrayList<String> exceptionReport = ExceptionCollector.getExceptionReport();
- if (!exceptionReport.isEmpty()){
- System.out.println("TOSCA Errors found in CSAR - failing the tests...");
- System.out.println(exceptionReport.toString());
- ExceptionCollector.clear();
- throw new SdcToscaParserException("CSAR didn't pass validation");
- }
- return sdcCsarHelper;
- }
-
-}