diff options
author | 2018-02-28 18:31:23 +0530 | |
---|---|---|
committer | 2018-03-04 09:37:31 +0000 | |
commit | 17ef2f46be5686d48d8e77b9b5a504456f169e3b (patch) | |
tree | a20dad7119a3eb3a18a93060532f74c7e0704dca /openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp | |
parent | 5a3d729a49c1a62b0fef9530753c51e598a64c1f (diff) |
Junit for verifying Pattern1B
Junit for verifying Pattern1B
Change-Id: Ic7af0f22abf097dbe9f48a838951478eca648cd2
Issue-ID: SDC-1072
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/openecomp')
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 |