Added oparent to sdc main
[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 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20 package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
21
22 import org.junit.Test;
23 import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
24
25 import java.io.IOException;
26
27 public class UnifiedCompositionSingleSubstitutionFullTest extends BaseFullTranslationTest {
28
29   private static final String BASE_DIRECTORY = "/mock/services/heattotosca/fulltest/singleSubstitution/";
30
31   @Test
32   public void testComputeWithTwoDifferentPortTypes() throws IOException {
33     testTranslationWithInit(BASE_DIRECTORY + "computeWithDiffPortType");
34   }
35
36   @Test
37   public void testComputeWithTwoSamePortTypes() throws IOException {
38     testTranslationWithInit(BASE_DIRECTORY + "computewithtwosameporttypes");
39   }
40
41   @Test
42   public void testComputeWithTwoSamePortTypes2() throws IOException {
43     testTranslationWithInit(BASE_DIRECTORY + "computewithtwosameporttypes2");
44   }
45
46   @Test
47   public void testComputeWithTwoSamePortTypes3() throws IOException {
48     testTranslationWithInit(BASE_DIRECTORY + "computewithtwosameporttypes3");
49   }
50
51   @Test
52   public void testComputeWithTwoSamePortTypes4() throws IOException {
53     testTranslationWithInit(BASE_DIRECTORY + "computewithtwosameporttypes4");
54   }
55
56   @Test
57   public void testComputeWithTwoDifferentPortTypesAndNested() throws IOException {
58     testTranslationWithInit(BASE_DIRECTORY + "computewithtwodiffporttypesandnested");
59   }
60
61   @Test
62   public void testComputeWithTwoDifferentPortAndServerGroup() throws IOException {
63     testTranslationWithInit(BASE_DIRECTORY + "computeWithDiffPortTypeAndServerGroup");
64   }
65
66   @Test
67   public void testComputeWithTwoPortsDiffTypeAndNodeConnectedIn() throws IOException {
68     testTranslationWithInit(BASE_DIRECTORY + "computeWithDiffPortTypeNodeConnectedIn");
69   }
70
71   @Test
72   public void testComputeWithTwoPortsSameTypeAndNodeConnectedIn() throws IOException {
73     testTranslationWithInit(BASE_DIRECTORY + "computeWithSamePortTypeNodeConnectedIn");
74   }
75
76   @Test
77   public void testComputeWithTwoPortsDiffTypeAndNodeConnectedOut() throws IOException {
78     testTranslationWithInit(BASE_DIRECTORY + "computeWithDiffPortTypeNodeConnectedOut");
79   }
80
81   @Test
82   public void testComputeWithTwoPortsSameTypeAndNodeConnectedOut() throws IOException {
83     testTranslationWithInit(BASE_DIRECTORY + "computeWithSamePortTypeNodeConnectedOut");
84   }
85
86   @Test
87   public void testComputeWithTwoDifferentPortTypesAndOutParamGetAttIn() throws IOException {
88     testTranslationWithInit(BASE_DIRECTORY + "diffPortTypeAndOutParamGetAttrIn");
89   }
90
91   @Test
92   public void testComputeWithTwoSamePortTypesAndOutParamGetAttIn() throws IOException {
93     testTranslationWithInit(BASE_DIRECTORY + "samePortTypeAndOutParamGetAttrIn");
94   }
95
96 //  @Test
97 //  public void testGeneralVf() throws IOException {
98 //    inputFilesPath =
99 //        "/mock/services/heattotosca/fulltest/singleSubstitution/generalVf/in";
100 //    outputFilesPath =
101 //        "/mock/services/heattotosca/fulltest/singleSubstitution/generalVf/out";
102 //
103 //    testTranslationWithInit();
104 //  }
105
106   @Test
107   public void testTwoSetsOfSingle() throws IOException {
108     testTranslationWithInit(BASE_DIRECTORY + "twoSetsOfSingle");
109   }
110
111   @Test
112   public void testTwoSetsOfSingleWithGetAttrBetweenThem() throws IOException {
113     testTranslationWithInit(BASE_DIRECTORY + "twoComputesWithGetAttrBetweenThem");
114   }
115
116   @Test
117   public void testOneComputeTwoDiffPortsAndGetAttrIn() throws IOException {
118     testTranslationWithInit(BASE_DIRECTORY + "oneComputeDiffPortTypesAndGetAttIn");
119   }
120
121   @Test
122   public void testOneComputeTwoSimilarPortsAndGetAttrIn() throws IOException {
123     testTranslationWithInit(BASE_DIRECTORY + "oneComputeSamePortsAndGetAttrIn");
124   }
125
126   @Test
127   public void testOneComputeTwoDiffPortsAndGetAttrOut() throws IOException {
128     testTranslationWithInit(BASE_DIRECTORY + "oneComputeDiffPortTypesAndGetAttOut");
129   }
130
131   @Test
132   public void testOneComputeTwoSimilarPortsAndGetAttrOut() throws IOException {
133     testTranslationWithInit(BASE_DIRECTORY + "oneComputeSamePortTypesAndGetAttOut");
134   }
135
136   @Test
137   public void testThreeNovaSameTypeNoConsolidation() throws IOException {
138     testTranslationWithInit(BASE_DIRECTORY + "threeSameComputesNoConsolidation");
139   }
140
141   @Test
142   public void testThreeNovaDiffTypeWithPorts() throws IOException {
143     testTranslationWithInit(BASE_DIRECTORY + "threeDiffComputesWithPorts");
144   }
145
146   @Test
147   public void testThreeNovaDiffTypeWithAllConnectivities() throws IOException {
148     testTranslationWithInit(BASE_DIRECTORY + "threeDiffComputesWithAllConnectivities");
149   }
150
151   @Test
152   public void testThreeNovaSameTypeWithGetAttrOutFromPort() throws IOException {
153     testTranslationWithInit(BASE_DIRECTORY + "threeNovaSameTypeWithGetAttrFromPort");
154   }
155
156   @Test
157   public void testInputOutputParameterTypes() throws IOException {
158     testTranslationWithInit(BASE_DIRECTORY + "inputOutputParamType");
159   }
160 }