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 testOneNestedWithTwoComputesOfSameType() throws IOException {
30 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithTwoComputesOfSameType/in";
32 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithTwoComputesOfSameType/out";
34 testTranslationWithInit();
38 public void testOneNestedWithTwoDiffComputeTypes() throws IOException {
40 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithTwoDiffComputeTypes/in";
42 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedWithTwoDiffComputeTypes/out";
44 testTranslationWithInit();
48 public void testTwoNestedNodeTemplatesOfSameType() throws IOException {
50 "/mock/services/heattotosca/fulltest/nestedSingleCompute/twoNestedNodeTemplatesWithSameComputeType/in";
52 "/mock/services/heattotosca/fulltest/nestedSingleCompute/twoNestedNodeTemplatesWithSameComputeType/out";
54 testTranslationWithInit();
58 public void testTwoDiffNestedFilesWithSameComputeType() throws IOException {
60 "/mock/services/heattotosca/fulltest/nestedSingleCompute/diffNestedFilesWithSameComputeType/in";
62 "/mock/services/heattotosca/fulltest/nestedSingleCompute/diffNestedFilesWithSameComputeType/out";
64 testTranslationWithInit();
68 public void testNestedCompositionNodesConnectedIn() throws IOException {
70 Nested Composition + node connected In
71 a. Dependency between a nested compute and a non-nested compute resource
72 b. Dependency between a nested compute and another nested resource (same type)
73 c. Dependency between a nested compute and another nested resource (different type)
74 d. Dependency between a non-consolidation entity resource and a nested compute resource
75 e. Dependency between a non-consolidation entity resource and a non-nested compute resource
76 f. Security Rule to Port nested connection
77 g. Security Rule to Port nested shared connection
80 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedNodesConnectedIn/in";
82 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedNodesConnectedIn/out";
84 testTranslationWithInit();
88 public void testNestedCompositionNodesGetAttrIn() throws IOException {
90 Nested composition with Get attribute in -
91 a. Get attribute in a non-nested compute from a nested compute resource
92 b. Get attribute in a non-nested compute from another consolidation entity resource
93 c. Get attribute in a nested compute from another nested compute resource of same type
94 d. Get attribute in a nested compute from another nested compute resource of different type
95 e. Get attribute in a nested compute from a regular consolidation entity resource
96 f. Get attribute in a non-consolidation entity resource from a nested compute resource
97 g. Get attribute in a non-consolidation entity resource from a non-nested compute resource
100 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedNodesGetAttrIn/in";
102 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedNodesGetAttrIn/out";
104 testTranslationWithInit();
108 public void testNestedCompositionOutputParamGetAttrIn() throws IOException {
110 Nested Composition + Output Param get attribute In
111 a. From a nested resource
112 b. From another nested resource of same type (represented by same nested file)
113 c. From a nested resource of different type (represented by different nested file)
114 d. From a non-nested consolidation entity resource
115 e. From a regular non-consolidation entity resource
118 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedOutputParamGetAttrIn/in";
120 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedOutputParamGetAttrIn/out";
122 testTranslationWithInit();
126 public void testMultiLevelNestedComposition() throws IOException {
128 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedMultiLevels/in";
130 "/mock/services/heattotosca/fulltest/nestedSingleCompute/nestedMultiLevels/out";
132 testTranslationWithInit();
136 public void testThreeNestedSameTypeTwoPointintToSameNestedFile() throws IOException {
138 "/mock/services/heattotosca/fulltest/nestedSingleCompute/threeNestedSameTypeTwoPointingOnSameNestedFile/in";
140 "/mock/services/heattotosca/fulltest/nestedSingleCompute/threeNestedSameTypeTwoPointingOnSameNestedFile/out";
142 testTranslationWithInit();
146 public void testThreeNestedSameTypePointingToDiffFiles() throws IOException {
148 "/mock/services/heattotosca/fulltest/nestedSingleCompute/threeNestedPointingToThreeDiffNestedFilesSameComputeType/in";
150 "/mock/services/heattotosca/fulltest/nestedSingleCompute/threeNestedPointingToThreeDiffNestedFilesSameComputeType/out";
152 testTranslationWithInit();