add tests 83/25083/2
authorYuli Shlosberg <ys9693@att.com>
Tue, 28 Nov 2017 14:08:18 +0000 (16:08 +0200)
committerYuli Shlosberg <ys9693@att.com>
Tue, 28 Nov 2017 14:14:47 +0000 (16:14 +0200)
Change-Id: I45ce436bb369275792b6c5e8a67b22c3158686da
Issue-ID: SDC-695
Signed-off-by: Yuli Shlosberg <ys9693@att.com>
pom.xml
src/test/java/org/openecomp/sdc/impl/ToscaParserValidationIssueTest.java
src/test/java/org/openecomp/sdc/impl/myTest.java [new file with mode: 0644]
src/test/resources/csars/service-Oren1-csar-4.csar [new file with mode: 0644]
version.properties

diff --git a/pom.xml b/pom.xml
index 3fb6550..f133349 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
        <artifactId>sdc-tosca</artifactId>\r
        <name>sdc-sdc-tosca</name>\r
        <description>SDC Tosca Parser JAR file for use by consumers</description>\r
-       <version>1.1.55-SNAPSHOT</version>\r
+       <version>1.1.56-SNAPSHOT</version>\r
        <packaging>jar</packaging>\r
 \r
        <properties>\r
                <dependency>\r
                        <groupId>org.openecomp.sdc.jtosca</groupId>\r
                        <artifactId>jtosca</artifactId>\r
-                       <version>1.1.16-SNAPSHOT</version>\r
+                       <version>1.1.19-SNAPSHOT</version>\r
                </dependency>\r
 \r
 \r
index 72bb5df..288cea6 100644 (file)
@@ -46,7 +46,7 @@ public class ToscaParserValidationIssueTest extends SdcToscaParserBasicTest {
        public void testMultiSinceConformanceLevelIssues() throws SdcToscaParserException {
                ISdcCsarHelper Nfod2images = getCsarHelper("csars/service-Nfod2images-csar.csar");//conformance level 4.0
                List<JToscaValidationIssue> notAnalyzedReport = factory.getNotAnalyzadExceptions();
-               assertEquals( notAnalyzedReport.size(),17);
+               assertEquals( notAnalyzedReport.size(),2);
                List<JToscaValidationIssue> warningsReport = factory.getWarningExceptions();
                assertEquals( warningsReport.size(),0);
                List<JToscaValidationIssue> criticalsReport = factory.getCriticalExceptions();
diff --git a/src/test/java/org/openecomp/sdc/impl/myTest.java b/src/test/java/org/openecomp/sdc/impl/myTest.java
new file mode 100644 (file)
index 0000000..2f0da7f
--- /dev/null
@@ -0,0 +1,42 @@
+package org.openecomp.sdc.impl;
+
+import org.openecomp.sdc.toscaparser.api.NodeTemplate;
+import org.testng.annotations.Test;
+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 java.io.File;
+import java.util.List;
+
+import static org.openecomp.sdc.impl.SdcToscaParserBasicTest.getCsarHelper;
+
+public class myTest  {
+
+       static SdcToscaParserFactory factory;
+       static ISdcCsarHelper fdntCsarHelper;
+
+       @Test
+       public void testNoValidationIssues() throws SdcToscaParserException {
+
+
+//             factory = SdcToscaParserFactory.getInstance();
+//             fdntCsarHelper = getCsarHelper("csars/service-Oren1-csar-4.csar");
+//
+//
+//             List<NodeTemplate> serviceNodeTemplatesByType = fdntCsarHelper.getServiceNodeTemplatesByType("org.openecomp.nodes.ForwardingPath");
+//
+//             String target_range = fdntCsarHelper.getNodeTemplatePropertyLeafValue(serviceNodeTemplatesByType.get(0), "target_range");
+
+       }
+
+
+       protected static 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;
+       }
+
+}
diff --git a/src/test/resources/csars/service-Oren1-csar-4.csar b/src/test/resources/csars/service-Oren1-csar-4.csar
new file mode 100644 (file)
index 0000000..1e1f738
Binary files /dev/null and b/src/test/resources/csars/service-Oren1-csar-4.csar differ
index d427655..87baeab 100644 (file)
@@ -5,7 +5,7 @@
 
 major=1
 minor=1
-patch=53
+patch=56
 
 base_version=${major}.${minor}.${patch}