X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=sdc-tosca%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fsdc%2Fimpl%2FSdcToscaParserBasicTest.java;fp=sdc-tosca%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fsdc%2Fimpl%2FSdcToscaParserBasicTest.java;h=d348bad0d89ccd92c7c8aa8e610f22324ea321b6;hb=974bbeb1ca432885c1569ec71c1b5060d5c1c519;hp=5b3a4d95294d52fca4c7297cc0fc12d3d03745cd;hpb=06fda9a063c89fe1b077437f054b047ccdebe0f4;p=sdc%2Fsdc-tosca.git diff --git a/sdc-tosca/src/test/java/org/onap/sdc/impl/SdcToscaParserBasicTest.java b/sdc-tosca/src/test/java/org/onap/sdc/impl/SdcToscaParserBasicTest.java index 5b3a4d9..d348bad 100644 --- a/sdc-tosca/src/test/java/org/onap/sdc/impl/SdcToscaParserBasicTest.java +++ b/sdc-tosca/src/test/java/org/onap/sdc/impl/SdcToscaParserBasicTest.java @@ -29,7 +29,6 @@ import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; import org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException; import org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory; - public class SdcToscaParserBasicTest extends BaseSetupExtension { public static final String VF_CUSTOMIZATION_UUID = "56179cd8-de4a-4c38-919b-bbc4452d2d73"; @@ -60,7 +59,7 @@ public class SdcToscaParserBasicTest extends BaseSetupExtension { static ISdcCsarHelper csarHelperServiceAnnotations; static ISdcCsarHelper csarHelperServiceAdiodAnnotations; static ISdcCsarHelper csarHelperServiceNetworkCloud; - static Map>> fdntCsarHelper_Data; + static Map>> fdntCsarHelper_Data; @Override void setup() throws SdcToscaParserException { @@ -94,9 +93,7 @@ public class SdcToscaParserBasicTest extends BaseSetupExtension { fdntCsarHelper_Data = new HashMap<>() { { - HashMap> FDNT; - - FDNT = new HashMap<>(); + final Map> FDNT = new HashMap<>(); FDNT.put("VF Name", Arrays.asList("FDNT 1")); FDNT.put("capabilities", Arrays.asList( "dnt_fw_rhrg.binding_DNT_FW_INT_DNS_TRUSTED_RVMI", @@ -155,19 +152,13 @@ public class SdcToscaParserBasicTest extends BaseSetupExtension { } protected ISdcCsarHelper getCsarHelper(String path) 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()); - return sdcCsarHelper; + return getCsarHelper(path, true); } protected 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; + return factory.getSdcCsarHelper(new File(SdcToscaParserBasicTest.class.getClassLoader().getResource(path).getFile()).getAbsolutePath(), + resolveGetInput); } @Override