e270765452b108667418316d60ec5f9ff93dfca0
[sdc.git] /
1 package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
2
3 import org.junit.Test;
4 import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
5
6 import java.io.IOException;
7
8 public class UnifiedCompositionNestedSingleComputeFullTest extends BaseFullTranslationTest {
9
10     private static final String BASE_DIRECTORY = "/mock/services/heattotosca/fulltest/nestedSingleCompute/";
11
12     @Test
13     public void testNestedWithOneCompute() throws IOException {
14         testTranslationWithInit(BASE_DIRECTORY + "nestedWithOneCompute");
15     }
16
17     @Test
18     public void testNestedWithOneComputeSamePortType() throws IOException {
19         testTranslationWithInit(BASE_DIRECTORY + "nestedWithOneComputeDiffPortType");
20     }
21
22     @Test
23     public void testOneNestedWithTwoComputesOfSameType() throws IOException {
24         //Not pattern 4 (Complex VFC)
25         testTranslationWithInit(BASE_DIRECTORY + "nestedWithTwoComputesOfSameType");
26     }
27
28     @Test
29     public void testOneNestedWithTwoDiffComputeTypes() throws IOException {
30         //Not pattern 4 (Complex VFC)
31         testTranslationWithInit(BASE_DIRECTORY + "nestedWithTwoDiffComputeTypes");
32     }
33
34     @Test
35     public void testTwoNestedNodeTemplatesOfSameType() throws IOException {
36         testTranslationWithInit(BASE_DIRECTORY + "twoNestedNodeTemplatesWithSameComputeType");
37     }
38
39     @Test
40     public void testTwoDiffNestedFilesWithSameComputeType() throws IOException {
41         testTranslationWithInit(BASE_DIRECTORY + "diffNestedFilesWithSameComputeType");
42     }
43
44     @Test
45     public void testNestedCompositionNodesConnectedIn() throws IOException {
46        /*
47         Nested Composition + node connected In
48          a. Dependency between a nested compute and a non-nested compute resource
49          b. Dependency between a nested compute and another nested resource (same type)
50          c. Dependency between a nested compute and another nested resource (different type)
51          d. Dependency between a non-consolidation entity resource and a nested compute resource
52          e. Dependency between a non-consolidation entity resource and a non-nested compute resource
53          f. Security Rule to Port nested connection
54          g. Security Rule to Port nested shared connection
55          */
56         testTranslationWithInit(BASE_DIRECTORY + "nestedNodesConnectedIn");
57     }
58
59     @Test
60     public void testNestedCompositionNodesGetAttrIn() throws IOException {
61        /*
62         Nested composition with Get attribute in -
63           a. Get attribute in a non-nested compute from a nested compute resource
64           b. Get attribute in a non-nested compute from another consolidation entity resource
65           c. Get attribute in a nested compute from another nested compute resource of same type
66           d. Get attribute in a nested compute from another nested compute resource of different type
67           e. Get attribute in a nested compute from a regular consolidation entity resource
68           f. Get attribute in a non-consolidation entity resource from a nested compute resource
69           g. Get attribute in a non-consolidation entity resource from a non-nested compute resource
70          */
71         testTranslationWithInit(BASE_DIRECTORY + "nestedNodesGetAttrIn");
72     }
73
74     @Test
75     public void testNestedCompositionOutputParamGetAttrIn() throws IOException {
76        /*
77         Nested Composition + Output Param get attribute In
78           a. From a nested resource
79           b. From another nested resource of same type (represented by same nested file)
80           c. From a nested resource of different type (represented by different nested file)
81           d. From a non-nested consolidation entity resource
82           e. From a regular non-consolidation entity resource
83          */
84         testTranslationWithInit(BASE_DIRECTORY + "nestedOutputParamGetAttrIn");
85     }
86
87     @Test
88     public void testMultiLevelNestedComposition() throws IOException {
89         //Not pattern 4 (Multi level Complex VFC)
90         testTranslationWithInit(BASE_DIRECTORY + "nestedMultiLevels");
91     }
92
93     @Test
94     public void testThreeNestedSameTypeTwoPointingToSameNestedFile() throws IOException {
95         testTranslationWithInit(BASE_DIRECTORY + "threeNestedSameTypeTwoPointingOnSameNestedFile");
96     }
97
98     @Test
99     public void testThreeNestedSameTypePointingToDiffFiles() throws IOException {
100         testTranslationWithInit(BASE_DIRECTORY + "threeNestedPointingToThreeDiffNestedFilesSameComputeType");
101     }
102
103     @Test
104     public void testMultipleReferencesToSameNestedFilesWithSameComputeType() throws IOException {
105         testTranslationWithInit(BASE_DIRECTORY + "multipleReferencesToSameNestedFilesWithSameComputeType");
106     }
107
108     @Test
109     public void testDuplicateReq() throws IOException {
110         testTranslationWithInit(BASE_DIRECTORY + "duplicateReqs");
111     }
112 }