1 package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
3 import org.junit.Before;
5 import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
7 import java.io.IOException;
9 public class UnifiedCompositionNestedSingleComputeFullTest extends BaseFullTranslationTest {
13 public void setUp() throws IOException {
14 // do not delete this function. it prevents the superclass setup from running
18 public void testNestedWithOneCompute() throws IOException {
20 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithOneCompute/in";
22 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithOneCompute/out";
24 testTranslationWithInit();
28 public void testNestedWithOneComputeSamePortType() throws IOException {
30 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithOneComputeDiffPortType/in";
32 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithOneComputeDiffPortType/out";
34 testTranslationWithInit();
38 public void testOneNestedWithTwoComputesOfSameType() throws IOException {
39 //Not pattern 4 (Complex VFC)
41 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithTwoComputesOfSameType/in";
43 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithTwoComputesOfSameType/out";
45 testTranslationWithInit();
49 public void testOneNestedWithTwoDiffComputeTypes() throws IOException {
50 //Not pattern 4 (Complex VFC)
52 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithTwoDiffComputeTypes/in";
54 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithTwoDiffComputeTypes/out";
56 testTranslationWithInit();
60 public void testTwoNestedNodeTemplatesOfSameType() throws IOException {
62 "/mock/services/heattotosca/fulltest/nestedSingleCompute/twoNestedNodeTemplatesWithSameComputeType/in";
64 "/mock/services/heattotosca/fulltest/nestedSingleCompute/twoNestedNodeTemplatesWithSameComputeType/out";
66 testTranslationWithInit();
70 public void testTwoDiffNestedFilesWithSameComputeType() throws IOException {
72 "/mock/services/heattotosca/fulltest/nestedSingleCompute/diffNestedFilesWithSameComputeType/in";
74 "/mock/services/heattotosca/fulltest/nestedSingleCompute/diffNestedFilesWithSameComputeType/out";
76 testTranslationWithInit();
80 public void testNestedCompositionNodesConnectedIn() throws IOException {
82 Nested Composition + node connected In
83 a. Dependency between a nested compute and a non-nested compute resource
84 b. Dependency between a nested compute and another nested resource (same type)
85 c. Dependency between a nested compute and another nested resource (different type)
86 d. Dependency between a non-consolidation entity resource and a nested compute resource
87 e. Dependency between a non-consolidation entity resource and a non-nested compute resource
88 f. Security Rule to Port nested connection
89 g. Security Rule to Port nested shared connection
92 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedNodesConnectedIn/in";
94 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedNodesConnectedIn/out";
96 testTranslationWithInit();
100 public void testNestedCompositionNodesGetAttrIn() throws IOException {
102 Nested composition with Get attribute in -
103 a. Get attribute in a non-nested compute from a nested compute resource
104 b. Get attribute in a non-nested compute from another consolidation entity resource
105 c. Get attribute in a nested compute from another nested compute resource of same type
106 d. Get attribute in a nested compute from another nested compute resource of different type
107 e. Get attribute in a nested compute from a regular consolidation entity resource
108 f. Get attribute in a non-consolidation entity resource from a nested compute resource
109 g. Get attribute in a non-consolidation entity resource from a non-nested compute resource
112 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedNodesGetAttrIn/in";
114 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedNodesGetAttrIn/out";
116 testTranslationWithInit();
120 public void testNestedCompositionOutputParamGetAttrIn() throws IOException {
122 Nested Composition + Output Param get attribute In
123 a. From a nested resource
124 b. From another nested resource of same type (represented by same nested file)
125 c. From a nested resource of different type (represented by different nested file)
126 d. From a non-nested consolidation entity resource
127 e. From a regular non-consolidation entity resource
130 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedOutputParamGetAttrIn/in";
132 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedOutputParamGetAttrIn/out";
134 testTranslationWithInit();
138 public void testMultiLevelNestedComposition() throws IOException {
139 //Not pattern 4 (Multi level Complex VFC)
141 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedMultiLevels/in";
143 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedMultiLevels/out";
145 testTranslationWithInit();
149 public void testThreeNestedSameTypeTwoPointintToSameNestedFile() throws IOException {
151 "/mock/services/heattotosca/fulltest/nestedSingleCompute/threeNestedSameTypeTwoPointingOnSameNestedFile/in";
153 "/mock/services/heattotosca/fulltest/nestedSingleCompute/threeNestedSameTypeTwoPointingOnSameNestedFile/out";
155 testTranslationWithInit();
159 public void testThreeNestedSameTypePointingToDiffFiles() throws IOException {
161 "/mock/services/heattotosca/fulltest/nestedSingleCompute/threeNestedPointingToThreeDiffNestedFilesSameComputeType/in";
163 "/mock/services/heattotosca/fulltest/nestedSingleCompute/threeNestedPointingToThreeDiffNestedFilesSameComputeType/out";
165 testTranslationWithInit();