1 package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
3 import org.junit.Before;
4 import org.junit.Ignore;
6 import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
8 import java.io.IOException;
10 public class UnifiedCompositionNestedSingleComputeFullTest extends BaseFullTranslationTest {
14 public void setUp() throws IOException {
15 // do not delete this function. it prevents the superclass setup from running
19 public void testNestedWithOneCompute() throws IOException {
21 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithOneCompute/in";
23 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithOneCompute/out";
25 testTranslationWithInit();
29 public void testNestedWithOneComputeSamePortType() throws IOException {
31 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithOneComputeDiffPortType/in";
33 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithOneComputeDiffPortType/out";
35 testTranslationWithInit();
39 public void testOneNestedWithTwoComputesOfSameType() throws IOException {
40 //Not pattern 4 (Complex VFC)
42 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithTwoComputesOfSameType/in";
44 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithTwoComputesOfSameType/out";
46 testTranslationWithInit();
50 public void testOneNestedWithTwoDiffComputeTypes() throws IOException {
51 //Not pattern 4 (Complex VFC)
53 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithTwoDiffComputeTypes/in";
55 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithTwoDiffComputeTypes/out";
57 testTranslationWithInit();
61 public void testTwoNestedNodeTemplatesOfSameType() throws IOException {
63 "/mock/services/heattotosca/fulltest/nestedSingleCompute/twoNestedNodeTemplatesWithSameComputeType/in";
65 "/mock/services/heattotosca/fulltest/nestedSingleCompute/twoNestedNodeTemplatesWithSameComputeType/out";
67 testTranslationWithInit();
71 public void testTwoDiffNestedFilesWithSameComputeType() throws IOException {
73 "/mock/services/heattotosca/fulltest/nestedSingleCompute/diffNestedFilesWithSameComputeType/in";
75 "/mock/services/heattotosca/fulltest/nestedSingleCompute/diffNestedFilesWithSameComputeType/out";
77 testTranslationWithInit();
81 public void testNestedCompositionNodesConnectedIn() throws IOException {
83 Nested Composition + node connected In
84 a. Dependency between a nested compute and a non-nested compute resource
85 b. Dependency between a nested compute and another nested resource (same type)
86 c. Dependency between a nested compute and another nested resource (different type)
87 d. Dependency between a non-consolidation entity resource and a nested compute resource
88 e. Dependency between a non-consolidation entity resource and a non-nested compute resource
89 f. Security Rule to Port nested connection
90 g. Security Rule to Port nested shared connection
93 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedNodesConnectedIn/in";
95 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedNodesConnectedIn/out";
97 testTranslationWithInit();
101 public void testNestedCompositionNodesGetAttrIn() throws IOException {
103 Nested composition with Get attribute in -
104 a. Get attribute in a non-nested compute from a nested compute resource
105 b. Get attribute in a non-nested compute from another consolidation entity resource
106 c. Get attribute in a nested compute from another nested compute resource of same type
107 d. Get attribute in a nested compute from another nested compute resource of different type
108 e. Get attribute in a nested compute from a regular consolidation entity resource
109 f. Get attribute in a non-consolidation entity resource from a nested compute resource
110 g. Get attribute in a non-consolidation entity resource from a non-nested compute resource
113 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedNodesGetAttrIn/in";
115 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedNodesGetAttrIn/out";
117 testTranslationWithInit();
121 public void testNestedCompositionOutputParamGetAttrIn() throws IOException {
123 Nested Composition + Output Param get attribute In
124 a. From a nested resource
125 b. From another nested resource of same type (represented by same nested file)
126 c. From a nested resource of different type (represented by different nested file)
127 d. From a non-nested consolidation entity resource
128 e. From a regular non-consolidation entity resource
131 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedOutputParamGetAttrIn/in";
133 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedOutputParamGetAttrIn/out";
135 testTranslationWithInit();
139 public void testMultiLevelNestedComposition() throws IOException {
140 //Not pattern 4 (Multi level Complex VFC)
142 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedMultiLevels/in";
144 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedMultiLevels/out";
146 testTranslationWithInit();
150 public void testThreeNestedSameTypeTwoPointingToSameNestedFile() throws IOException {
152 "/mock/services/heattotosca/fulltest/nestedSingleCompute/threeNestedSameTypeTwoPointingOnSameNestedFile/in";
154 "/mock/services/heattotosca/fulltest/nestedSingleCompute/threeNestedSameTypeTwoPointingOnSameNestedFile/out";
156 testTranslationWithInit();
160 public void testThreeNestedSameTypePointingToDiffFiles() throws IOException {
162 "/mock/services/heattotosca/fulltest/nestedSingleCompute/threeNestedPointingToThreeDiffNestedFilesSameComputeType/in";
164 "/mock/services/heattotosca/fulltest/nestedSingleCompute/threeNestedPointingToThreeDiffNestedFilesSameComputeType/out";
166 testTranslationWithInit();
170 public void testMultipleReferencesToSameNestedFilesWithSameComputeType() throws IOException {
172 "/mock/services/heattotosca/fulltest/nestedSingleCompute/multipleReferencesToSameNestedFilesWithSameComputeType/in";
174 "/mock/services/heattotosca/fulltest/nestedSingleCompute/multipleReferencesToSameNestedFilesWithSameComputeType/out";
176 testTranslationWithInit();