477f72520affcdc080035abe3dc063eab729ef95
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / java / org / openecomp / sdc / translator / services / heattotosca / impl / fulltest / UnifiedCompositionSingleSubstitutionFullTest.java
1 package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
2
3 import org.junit.Before;
4 import org.junit.Test;
5 import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
6
7 import java.io.IOException;
8
9 public class UnifiedCompositionSingleSubstitutionFullTest extends BaseFullTranslationTest {
10
11   @Override
12   @Before
13   public void setUp() throws IOException {
14     // do not delete this function. it prevents the superclass setup from running
15   }
16
17   @Test
18   public void testComputeWithTwoDifferentPortTypes() throws IOException {
19     inputFilesPath =
20         "/mock/services/heattotosca/fulltest/singleSubstitution/computeWithDiffPortType/in";
21     outputFilesPath =
22         "/mock/services/heattotosca/fulltest/singleSubstitution/computeWithDiffPortType/out";
23
24     testTranslationWithInit();
25   }
26
27   @Test
28   public void testComputeWithTwoSamePortTypes() throws IOException {
29     inputFilesPath =
30         "/mock/services/heattotosca/fulltest/singleSubstitution/computewithtwosameporttypes/in";
31     outputFilesPath =
32         "/mock/services/heattotosca/fulltest/singleSubstitution/computewithtwosameporttypes/out";
33
34     testTranslationWithInit();
35   }
36
37   @Test
38   public void testComputeWithTwoDifferentPortTypesAndNested() throws IOException {
39     inputFilesPath =
40         "/mock/services/heattotosca/fulltest/singleSubstitution/computewithtwodiffporttypesandnested/in";
41     outputFilesPath =
42         "/mock/services/heattotosca/fulltest/singleSubstitution/computewithtwodiffporttypesandnested/out";
43
44     testTranslationWithInit();
45   }
46
47   @Test
48   public void testComputeWithTwoDifferentPortAndServerGroup() throws IOException {
49     inputFilesPath =
50         "/mock/services/heattotosca/fulltest/singleSubstitution/computeWithDiffPortTypeAndServerGroup/in";
51     outputFilesPath =
52         "/mock/services/heattotosca/fulltest/singleSubstitution/computeWithDiffPortTypeAndServerGroup/out";
53
54     testTranslationWithInit();
55   }
56
57   @Test
58   public void testComputeWithTwoPortsDiffTypeAndNodeConnectedIn() throws IOException {
59     inputFilesPath =
60         "/mock/services/heattotosca/fulltest/singleSubstitution/computeWithDiffPortTypeNodeConnectedIn/in";
61     outputFilesPath =
62         "/mock/services/heattotosca/fulltest/singleSubstitution/computeWithDiffPortTypeNodeConnectedIn/out";
63
64     testTranslationWithInit();
65   }
66
67   @Test
68   public void testComputeWithTwoPortsSameTypeAndNodeConnectedIn() throws IOException {
69     inputFilesPath =
70         "/mock/services/heattotosca/fulltest/singleSubstitution/computeWithSamePortTypeNodeConnectedIn/in";
71     outputFilesPath =
72         "/mock/services/heattotosca/fulltest/singleSubstitution/computeWithSamePortTypeNodeConnectedIn/out";
73
74     testTranslationWithInit();
75   }
76
77   @Test
78   public void testComputeWithTwoPortsDiffTypeAndNodeConnectedOut() throws IOException {
79     inputFilesPath =
80         "/mock/services/heattotosca/fulltest/singleSubstitution/computeWithDiffPortTypeNodeConnectedOut/in";
81     outputFilesPath =
82         "/mock/services/heattotosca/fulltest/singleSubstitution/computeWithDiffPortTypeNodeConnectedOut/out";
83
84     testTranslationWithInit();
85   }
86
87   @Test
88   public void testComputeWithTwoPortsSameTypeAndNodeConnectedOut() throws IOException {
89     inputFilesPath =
90         "/mock/services/heattotosca/fulltest/singleSubstitution/computeWithSamePortTypeNodeConnectedOut/in";
91     outputFilesPath =
92         "/mock/services/heattotosca/fulltest/singleSubstitution/computeWithSamePortTypeNodeConnectedOut/out";
93
94     testTranslationWithInit();
95   }
96
97   @Test
98   public void testComputeWithTwoDifferentPortTypesAndOutParamGetAttIn() throws IOException {
99     inputFilesPath =
100         "/mock/services/heattotosca/fulltest/singleSubstitution/diffPortTypeAndOutParamGetAttrIn/in";
101     outputFilesPath =
102         "/mock/services/heattotosca/fulltest/singleSubstitution/diffPortTypeAndOutParamGetAttrIn/out";
103
104     testTranslationWithInit();
105   }
106
107   @Test
108   public void testComputeWithTwoSamePortTypesAndOutParamGetAttIn() throws IOException {
109     inputFilesPath =
110         "/mock/services/heattotosca/fulltest/singleSubstitution/samePortTypeAndOutParamGetAttrIn/in";
111     outputFilesPath =
112         "/mock/services/heattotosca/fulltest/singleSubstitution/samePortTypeAndOutParamGetAttrIn/out";
113
114     testTranslationWithInit();
115   }
116
117   @Test
118   public void testGeneralVf() throws IOException {
119     inputFilesPath =
120         "/mock/services/heattotosca/fulltest/singleSubstitution/generalVf/in";
121     outputFilesPath =
122         "/mock/services/heattotosca/fulltest/singleSubstitution/generalVf/out";
123
124     testTranslationWithInit();
125   }
126
127   @Test
128   public void testTwoSetsOfSingle() throws IOException {
129     inputFilesPath =
130         "/mock/services/heattotosca/fulltest/singleSubstitution/twoSetsOfSingle/in";
131     outputFilesPath =
132         "/mock/services/heattotosca/fulltest/singleSubstitution/twoSetsOfSingle/out";
133
134
135     testTranslationWithInit();
136   }
137
138   @Test
139   public void testTwoSetsOfSingleWithGetAttrBetweenThem() throws IOException {
140     inputFilesPath =
141         "/mock/services/heattotosca/fulltest/singleSubstitution/twoComputesWithGetAttrBetweenThem/in";
142     outputFilesPath =
143         "/mock/services/heattotosca/fulltest/singleSubstitution/twoComputesWithGetAttrBetweenThem/out";
144
145     testTranslationWithInit();
146   }
147
148   @Test
149   public void testOneComputeTwoDiffPortsAndGetAttrIn() throws IOException {
150     inputFilesPath =
151         "/mock/services/heattotosca/fulltest/singleSubstitution/oneComputeDiffPortTypesAndGetAttIn/in";
152     outputFilesPath =
153         "/mock/services/heattotosca/fulltest/singleSubstitution/oneComputeDiffPortTypesAndGetAttIn/out";
154
155     testTranslationWithInit();
156   }
157
158   @Test
159   public void testOneComputeTwoSimilarPortsAndGetAttrIn() throws IOException {
160     inputFilesPath =
161         "/mock/services/heattotosca/fulltest/singleSubstitution/oneComputeSamePortsAndGetAttrIn/in";
162     outputFilesPath =
163         "/mock/services/heattotosca/fulltest/singleSubstitution/oneComputeSamePortsAndGetAttrIn/out";
164
165     testTranslationWithInit();
166   }
167
168   @Test
169   public void testOneComputeTwoDiffPortsAndGetAttrOut() throws IOException {
170     inputFilesPath =
171         "/mock/services/heattotosca/fulltest/singleSubstitution/oneComputeDiffPortTypesAndGetAttOut/in";
172     outputFilesPath =
173         "/mock/services/heattotosca/fulltest/singleSubstitution/oneComputeDiffPortTypesAndGetAttOut/out";
174
175     testTranslationWithInit();
176   }
177
178   @Test
179   public void testOneComputeTwoSimilarPortsAndGetAttrOut() throws IOException {
180     inputFilesPath =
181         "/mock/services/heattotosca/fulltest/singleSubstitution/oneComputeSamePortTypesAndGetAttOut/in";
182     outputFilesPath =
183         "/mock/services/heattotosca/fulltest/singleSubstitution/oneComputeSamePortTypesAndGetAttOut/out";
184
185     testTranslationWithInit();
186   }
187
188   @Test
189   public void testThreeNovaSameTypeNoConsolidation() throws IOException {
190     inputFilesPath =
191         "/mock/services/heattotosca/fulltest/singleSubstitution/threeSameComputesNoConsolidation/in";
192     outputFilesPath =
193         "/mock/services/heattotosca/fulltest/singleSubstitution/threeSameComputesNoConsolidation/out";
194
195     testTranslationWithInit();
196   }
197
198   @Test
199   public void testThreeNovaDiffTypeWithPorts() throws IOException {
200     inputFilesPath =
201         "/mock/services/heattotosca/fulltest/singleSubstitution/threeDiffComputesWithPorts/in";
202     outputFilesPath =
203         "/mock/services/heattotosca/fulltest/singleSubstitution/threeDiffComputesWithPorts/out";
204
205     testTranslationWithInit();
206   }
207
208   @Test
209   public void testThreeNovaDiffTypeWithAllConnectivities() throws IOException {
210     inputFilesPath =
211         "/mock/services/heattotosca/fulltest/singleSubstitution/threeDiffComputesWithAllConnectivities/in";
212     outputFilesPath =
213         "/mock/services/heattotosca/fulltest/singleSubstitution/threeDiffComputesWithAllConnectivities/out";
214
215     testTranslationWithInit();
216   }
217
218   @Test
219   public void testThreeNovaSameTypeWithGetAttrOutFromPort() throws IOException {
220     inputFilesPath =
221         "/mock/services/heattotosca/fulltest/singleSubstitution/threeNovaSameTypeWithGetAttrFromPort/in";
222     outputFilesPath =
223         "/mock/services/heattotosca/fulltest/singleSubstitution/threeNovaSameTypeWithGetAttrFromPort/out";
224
225     testTranslationWithInit();
226   }
227 }