diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java')
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(); |