aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java
diff options
context:
space:
mode:
authortalio <tali.orenbach@amdocs.com>2017-11-05 11:34:51 +0200
committertalio <tali.orenbach@amdocs.com>2017-11-05 11:59:36 +0200
commit24fbb8c526272ef7c4455e0f3f1a6709f87476a3 (patch)
tree5fb2aa4c240037bd73023dcf59b9c072a8716219 /openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java
parent7d2eca54a057341a35dbe4be2ad732be7d137d80 (diff)
dynamic ports
ignore "depends_on" from / to nested entities, and adding tests Issue - Id : SDC-576 Change-Id: I2bdf8d97e727395420ff1516c97ff4c8af541749 Signed-off-by: talio <tali.orenbach@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java')
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifedCompositionDynamicPortsTest.java56
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseFullTranslationTest.java8
2 files changed, 64 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifedCompositionDynamicPortsTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifedCompositionDynamicPortsTest.java
new file mode 100644
index 0000000000..58f17493d4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifedCompositionDynamicPortsTest.java
@@ -0,0 +1,56 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
+
+import java.io.IOException;
+
+public class UnifedCompositionDynamicPortsTest extends BaseFullTranslationTest {
+ private static final String baseDirectory = "/mock/services/heattotosca/fulltest/dynamicPorts";
+ @Override
+ @Before
+ public void setUp() throws IOException {
+ // do not delete this function. it prevents the superclass setup from running
+ }
+
+ @Test
+ public void testDynamicPortWithDependsOn() throws IOException {
+ testTranslationWithInit(
+ baseDirectory + "/dynamicPortsWithDependsOn/in",
+ baseDirectory + "/dynamicPortsWithDependsOn/out"
+ );
+ }
+
+ @Test
+ public void testDependsOnFromNovaToNestedPort() throws IOException {
+ testTranslationWithInit(
+ baseDirectory + "/dependsOnFromNovaToNestedPort/in",
+ baseDirectory + "/dependsOnFromNovaToNestedPort/out"
+ );
+ }
+
+ @Test
+ public void testDependsOnFromPortToNested() throws IOException {
+ testTranslationWithInit(
+ baseDirectory + "/dependsOnFromPortToNested/in",
+ baseDirectory + "/dependsOnFromPortToNested/out"
+ );
+ }
+
+ @Test
+ public void testDependsOnFromVfcToNested() throws IOException {
+ testTranslationWithInit(
+ baseDirectory + "/dependsOnFromVfcToNested/in",
+ baseDirectory + "/dependsOnFromVfcToNested/out"
+ );
+ }
+
+ @Test
+ public void testDependsOnFromNestedToNested() throws IOException {
+ testTranslationWithInit(
+ baseDirectory + "/dependsOnFromNestedToNested/in",
+ baseDirectory + "/dependsOnFromNestedToNested/out"
+ );
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseFullTranslationTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseFullTranslationTest.java
index 5de07203a1..d35b7dcec4 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseFullTranslationTest.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseFullTranslationTest.java
@@ -77,6 +77,14 @@ public class BaseFullTranslationTest {
initTranslatorAndTranslate();
}
+ protected void testTranslationWithInit (String inputFilesPath,
+ String outputFilesPath) throws IOException {
+ this.inputFilesPath = inputFilesPath;
+ this.outputFilesPath = outputFilesPath;
+
+ testTranslationWithInit();
+ }
+
protected void testTranslationWithInit() throws IOException {
initTranslatorAndTranslate();
testTranslation();