aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org
diff options
context:
space:
mode:
authorsiddharth0905 <siddharth.singh4@amdocs.com>2018-03-05 15:00:10 +0530
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-03-06 17:16:26 +0000
commit2064106f298ac9683821e83acbfd87dac8b5b32f (patch)
tree0ad553db38d337f8030a4575718f78fa41d3179c /openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org
parent43f99092c2ca7e69b009ac2b5372497d564fba04 (diff)
Code Change & Junit for verifying Pattern4
Simplified the code as per the review comment Change-Id: I4614cf25d743afb54d686934f9faa2a26edf0c89 Issue-ID: SDC-1074 Signed-off-by: siddharth0905 <siddharth.singh4@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org')
-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.java87
1 files changed, 87 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 4b22e66f6b..860df69927 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
@@ -29,6 +29,8 @@ public class UnifiedCompositionSubInterfaceFullTest extends BaseFullTranslationT
"/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern1b/";
private static final String PATTERN_1C1_BASE_DIRECTORY =
"/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern1c1/";
+ private static final String PATTERN_4_BASE_DIRECTORY =
+ "/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern4/";
@Test
public void testSubInterfaceComputePortNetwork() throws IOException {
@@ -243,4 +245,89 @@ public class UnifiedCompositionSubInterfaceFullTest extends BaseFullTranslationT
*/
testTranslationWithInit(PATTERN_1C1_BASE_DIRECTORY + "allConnectivities");
}
+
+ //Pattern 4 Test Cases
+ @Test
+ public void testSubInterfaceComputePortNetworkPattern4() throws IOException {
+ /**
+ * Nested Heat file with one compute, one port and one subinterface resource group with only
+ * port connected to network
+ */
+ testTranslationWithInit(PATTERN_4_BASE_DIRECTORY +
+ "computePortNetworkSubInterface");
+ }
+
+ @Test
+ public void testSubInterfaceMultiplePortsMultipleVlansPattern4() throws IOException {
+ /**
+ * Nested Heat file with one compute, two ports and two subinterface resource groups with
+ * 1. Port connected to network
+ * 2. Sub-interfaces each with different nested files
+ */
+ testTranslationWithInit(PATTERN_4_BASE_DIRECTORY + "multiplePortsMultipleVlans");
+ }
+
+ @Test
+ public void testSubInterfaceMultipleVlanDiffFilePattern4() throws IOException {
+ /**
+ * Nested Heat file with one compute, one port and two subinterface resource groups with
+ * 1. Port connected to network
+ * 2. Sub-interfaces with different nested files
+ */
+ testTranslationWithInit(PATTERN_4_BASE_DIRECTORY + "multipleVlanDiffFile");
+ }
+
+ @Test
+ public void testSubInterfaceMultipleVlanSameFilePattern4() throws IOException {
+ /**
+ * Nested Heat file with one compute, one port and two subinterface resource groups with
+ * 1. Port connected to network
+ * 2. Sub-interfaces with same nested files
+ */
+ testTranslationWithInit(PATTERN_4_BASE_DIRECTORY + "multipleVlanSameFile");
+ }
+
+ @Test
+ public void testSubInterfaceRegularNestedPattern4() throws IOException {
+ /**
+ * Nested Heat file with one compute, one port and one subinterface resource represented
+ * through a regular nested resource and not using a resource group
+ */
+ testTranslationWithInit(PATTERN_4_BASE_DIRECTORY + "regularNestedSubInterface");
+ }
+
+ @Test
+ public void testSubInterfaceGetAttrInOutPattern4() throws IOException {
+ /**
+ * Nested Heat file with one compute, one port and one subinterface resource group with
+ * 1. Port connected to network
+ * 2. Sub-interface connected to different network
+ * 3. Sub-interface has get attribute (in) connectivity from network resource
+ * 4. Sub-interface has get attribute (out) connectivity to second network resource
+ * 5. Sub-interface has get attribute (in) connectivity from output param
+ */
+ testTranslationWithInit(PATTERN_4_BASE_DIRECTORY + "subInterfaceGetAttrInOut");
+ }
+
+ @Test
+ public void testSubInterfaceNodesConnectedInPattern4() throws IOException {
+ /**
+ * Nested Heat file with one compute, one port and one subinterface resource group with
+ * 1. Port connected to network
+ * 2. Sub-interface connected to different network
+ * 3. Sub-interface has depends on (in) connectivity from network resource
+ */
+ testTranslationWithInit(PATTERN_4_BASE_DIRECTORY + "subInterfaceNodesConnectedIn");
+ }
+
+ @Test
+ public void testSubInterfaceNodesConnectedOutPattern4() throws IOException {
+ /**
+ * Nested Heat file with one compute, one port and one subinterface resource group with
+ * 1. Port connected to network
+ * 2. Sub-interface connected to same network
+ * 3. Sub-interface has depends on (out) connectivity with network resource
+ */
+ testTranslationWithInit(PATTERN_4_BASE_DIRECTORY + "subInterfaceNodesConnectedOut");
+ }
}