update SDC-TOSCA package names
[sdc/sdc-tosca.git] / src / test / java / org / onap / sdc / impl / myTest.java
1 package org.onap.sdc.impl;
2
3 import org.onap.sdc.toscaparser.api.NodeTemplate;
4 import org.testng.annotations.Test;
5 import org.onap.sdc.tosca.parser.api.ISdcCsarHelper;
6 import org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException;
7 import org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory;
8
9 import java.io.File;
10
11 import static org.onap.sdc.impl.SdcToscaParserBasicTest.getCsarHelper;
12
13 public class myTest  {
14
15         static SdcToscaParserFactory factory;
16         static ISdcCsarHelper fdntCsarHelper;
17
18         @Test
19         public void testNoValidationIssues() throws SdcToscaParserException {
20
21
22 //              factory = SdcToscaParserFactory.getInstance();
23 //              fdntCsarHelper = getCsarHelper("csars/service-Oren1-csar-4.csar");
24 //
25 //
26 //              List<NodeTemplate> serviceNodeTemplatesByType = fdntCsarHelper.getServiceNodeTemplatesByType("org.openecomp.nodes.ForwardingPath");
27 //
28 //              String target_range = fdntCsarHelper.getNodeTemplatePropertyLeafValue(serviceNodeTemplatesByType.get(0), "target_range");
29
30         }
31
32
33         protected static ISdcCsarHelper getCsarHelper(String path) throws SdcToscaParserException {
34                 System.out.println("Parsing CSAR "+path+"...");
35                 String fileStr1 = SdcToscaParserBasicTest.class.getClassLoader().getResource(path).getFile();
36                 File file1 = new File(fileStr1);
37                 ISdcCsarHelper sdcCsarHelper = factory.getSdcCsarHelper(file1.getAbsolutePath());
38                 return sdcCsarHelper;
39         }
40
41 }