aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/openecomp/sdc/impl/SdcToscaParserBasicTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/openecomp/sdc/impl/SdcToscaParserBasicTest.java')
-rw-r--r--src/test/java/org/openecomp/sdc/impl/SdcToscaParserBasicTest.java38
1 files changed, 25 insertions, 13 deletions
diff --git a/src/test/java/org/openecomp/sdc/impl/SdcToscaParserBasicTest.java b/src/test/java/org/openecomp/sdc/impl/SdcToscaParserBasicTest.java
index 2789a93..4c1f84e 100644
--- a/src/test/java/org/openecomp/sdc/impl/SdcToscaParserBasicTest.java
+++ b/src/test/java/org/openecomp/sdc/impl/SdcToscaParserBasicTest.java
@@ -12,7 +12,6 @@ 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.JToscaException;
-import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
@@ -28,8 +27,10 @@ public abstract class SdcToscaParserBasicTest {
static ISdcCsarHelper nfodCsarHlper;
static ISdcCsarHelper ipAssignCsarHelper;
static ISdcCsarHelper nestedVfcCsarHlper;
- static ISdcCsarHelper nfodNEWCsarHlper;
-
+ static ISdcCsarHelper nfodNEWCsarHlper;
+ static ISdcCsarHelper resolveGetInputCsar;
+ static ISdcCsarHelper resolveGetInputCsarFalse;
+ static ISdcCsarHelper resolveGetInputCsarQA;
static Map<String, HashMap<String, List<String>>> fdntCsarHelper_Data;
@@ -37,15 +38,18 @@ public abstract class SdcToscaParserBasicTest {
public static void init() throws SdcToscaParserException, JToscaException, IOException {
factory = SdcToscaParserFactory.getInstance();
- fdntCsarHelper = getCsarHelper("csars/service-sunny-flow.csar");
- rainyCsarHelperMultiVfs = getCsarHelper("csars/service-ServiceFdnt-csar-rainy.csar");
- rainyCsarHelperSingleVf = getCsarHelper("csars/service-ServiceFdnt-csar.csar");
- fdntCsarHelperWithInputs = getCsarHelper("csars/service-ServiceFdnt-with-get-input.csar");
- nfodCsarHlper = getCsarHelper("csars/service-NfodService-csar.csar");
- ipAssignCsarHelper = getCsarHelper("csars/service-Ipassignservice-csar.csar");
- nestedVfcCsarHlper = getCsarHelper("csars/service-nested-vfc-csar.csar");
- nfodNEWCsarHlper = getCsarHelper("csars/service-Nfod2images-csar.csar");
-
+ fdntCsarHelper = getCsarHelper("csars/service-sunny-flow.csar", false);
+ rainyCsarHelperMultiVfs = getCsarHelper("csars/service-ServiceFdnt-csar-rainy.csar", false);
+ rainyCsarHelperSingleVf = getCsarHelper("csars/service-ServiceFdnt-csar.csar", false);
+ fdntCsarHelperWithInputs = getCsarHelper("csars/service-ServiceFdnt-with-get-input.csar", false);
+ nfodCsarHlper = getCsarHelper("csars/service-NfodService-csar.csar", false);
+ ipAssignCsarHelper = getCsarHelper("csars/service-Ipassignservice-csar.csar", false);
+ nestedVfcCsarHlper = getCsarHelper("csars/service-nested-vfc-csar.csar", false);
+ nfodNEWCsarHlper = getCsarHelper("csars/service-Nfod2images-csar.csar", false);
+ resolveGetInputCsar = getCsarHelper("csars/service-resolve-get-input-csar.csar");
+ resolveGetInputCsarFalse = getCsarHelper("csars/service-resolve-get-input-csar.csar",false);
+ resolveGetInputCsarQA = getCsarHelper("csars/service-resolve-get-input-csar_QA.csar");
+
fdntCsarHelper_Data = new HashMap<String, HashMap<String, List<String>>>(){
{
HashMap<String, List<String>> FDNT ;
@@ -115,7 +119,15 @@ public abstract class SdcToscaParserBasicTest {
ISdcCsarHelper sdcCsarHelper = factory.getSdcCsarHelper(file1.getAbsolutePath());
return sdcCsarHelper;
}
-
+
+ protected static ISdcCsarHelper getCsarHelper(String path, boolean resolveGetInput) throws SdcToscaParserException {
+ System.out.println("Parsing CSAR "+path+"...");
+ String fileStr1 = SdcToscaParserBasicTest.class.getClassLoader().getResource(path).getFile();
+ File file1 = new File(fileStr1);
+ ISdcCsarHelper sdcCsarHelper = factory.getSdcCsarHelper(file1.getAbsolutePath(), resolveGetInput);
+ return sdcCsarHelper;
+ }
+
@BeforeMethod
public void setupTest(Method method) {
System.out.println("#### Starting Test " + method.getName() + " ###########");