summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionSubInterfaceFullTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionSubInterfaceFullTest.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/UnifiedCompositionSubInterfaceFullTest.java56
1 files changed, 56 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/UnifiedCompositionSubInterfaceFullTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionSubInterfaceFullTest.java
index 558ebf44b3..4b22e66f6b 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionSubInterfaceFullTest.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionSubInterfaceFullTest.java
@@ -25,6 +25,8 @@ public class UnifiedCompositionSubInterfaceFullTest extends BaseFullTranslationT
private static final String PATTERN_1A_BASE_DIRECTORY =
"/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern1a/";
+ private static final String PATTERN_1B_BASE_DIRECTORY =
+ "/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern1b/";
private static final String PATTERN_1C1_BASE_DIRECTORY =
"/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern1c1/";
@@ -123,6 +125,60 @@ public class UnifiedCompositionSubInterfaceFullTest extends BaseFullTranslationT
testTranslationWithInit(PATTERN_1A_BASE_DIRECTORY + "notBoundToParentPort");
}
+ //Pattern 1B test
+ @Test
+ public void testDiffComputeSubInterface() throws IOException {
+ /**
+ * Heat file with one compute, one port and one subinterface resource group with
+ * 1. There are two compute both of different type
+ */
+ testTranslationWithInit(PATTERN_1B_BASE_DIRECTORY + "diffComputeSubInterface");
+ }
+
+ @Test
+ public void testOnePortIsConnectedWithSubInf() throws IOException {
+ /**
+ * Heat file with one compute, one port and one subinterface resource group with
+ * 1. Two compute of same type
+ * 2. Two port of same type but only one of them is having sub interface binding
+ */
+ testTranslationWithInit(PATTERN_1B_BASE_DIRECTORY + "onePortIsConnectedWithSubInf");
+ }
+
+ @Test
+ public void testRegularNestedSubInterface() throws IOException {
+ /**
+ * Heat file with one compute, one port and one sub interface without resource group
+ * 1. Two compute of same type
+ * 2. Two port are of different type
+ * 3. Sub interface properties are same in both port
+ */
+ testTranslationWithInit(PATTERN_1B_BASE_DIRECTORY + "regularNestedSubInterface");
+ }
+
+ @Test
+ public void testSameComputeDiffPortSubInterface() throws IOException {
+ /**
+ * Heat file with one compute, one port and one subinterface resource group with
+ * 1. Two compute of same type
+ * 2. Two port are of different type
+ * 3. Sub interface properties are same in both port
+ */
+ testTranslationWithInit(PATTERN_1B_BASE_DIRECTORY + "sameComputeDiffPortSubInterface");
+ }
+
+ @Test
+ public void testSameComputeSamePortDiffSubInterfaceFile() throws IOException {
+ /**
+ * Heat file with one compute, one port and one subinterface resource group with
+ * 1. Two compute of same type
+ * 2. Two port are of same type connected with different sub interface nested file
+ * 3. Sub interface property are same for both port
+ */
+ testTranslationWithInit(PATTERN_1B_BASE_DIRECTORY
+ + "sameComputeSamePortDiffSubInterfaceFile");
+ }
+
//****************** PATTERN 1C1 Tests ***************************
@Test