c5f655afbb608ee1cf2843c758294af053fdbccd
[sdc.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 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
21 package org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation;
22
23 import org.junit.Before;
24 import org.junit.Ignore;
25 import org.junit.Test;
26
27 import java.io.IOException;
28
29
30 public class ContrailV2VmInterfaceToNetResourceConnectionTest extends BaseResourceTranslationTest {
31   @Override
32   @Before
33   public void setUp() throws IOException {
34     // do not delete this function. it prevents the superclass setup from running
35   }
36
37   @Test
38   public void testTranslateVMIToNetNestedConnection() throws Exception {
39     inputFilesPath = "/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/inputfiles";
40     outputFilesPath =
41         "/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles";
42     initTranslatorAndTranslate();
43     testTranslation();
44   }
45
46   @Test
47   public void testTranslateVlanToNetNestedConnection() throws Exception {
48     inputFilesPath = "/mock/services/heattotosca/VlanToNetConnection/nested/inputfiles";
49     outputFilesPath =
50         "/mock/services/heattotosca/VlanToNetConnection/nested/expectedoutputfiles";
51     initTranslatorAndTranslate();
52     testTranslation();
53   }
54
55   @Test
56   public void testTranslateVMIToNetMultiNestedConnection() throws Exception {
57     inputFilesPath =
58         "/mock/services/heattotosca/VMInterfaceToNettworkConnection/nestedMultiLevels/inputfiles";
59     outputFilesPath =
60         "/mock/services/heattotosca/VMInterfaceToNettworkConnection/nestedMultiLevels/expectedoutputfiles";
61     initTranslatorAndTranslate();
62     testTranslation();
63   }
64
65   @Test
66   public void testTranslateVlanToNetMultiNestedConnection() throws Exception {
67     inputFilesPath =
68         "/mock/services/heattotosca/VlanToNetConnection/nestedMultiLevels/inputfiles";
69     outputFilesPath =
70         "/mock/services/heattotosca/VlanToNetConnection/nestedMultiLevels/expectedoutputfiles";
71     initTranslatorAndTranslate();
72     testTranslation();
73   }
74
75   @Test
76   public void testTranslateVMIToSharedNetNestedConnection() throws Exception {
77     inputFilesPath = "/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles";
78     outputFilesPath =
79         "/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles";
80     initTranslatorAndTranslate();
81     testTranslation();
82   }
83
84   @Test
85   public void testTranslateVlanToSharedNetNestedConnection() throws Exception {
86     inputFilesPath = "/mock/services/heattotosca/VlanToNetConnection/shared/inputfiles";
87     outputFilesPath =
88         "/mock/services/heattotosca/VlanToNetConnection/shared/expectedoutputfiles";
89     initTranslatorAndTranslate();
90     testTranslation();
91   }
92
93   @Test
94   public void testTranslateVMIToNetSharedMultiNestedConnection() throws Exception {
95     inputFilesPath =
96         "/mock/services/heattotosca/VMInterfaceToNettworkConnection/sharedNestedMultiLevels/inputfiles";
97     outputFilesPath =
98         "/mock/services/heattotosca/VMInterfaceToNettworkConnection/sharedNestedMultiLevels/expectedoutputfiles";
99     initTranslatorAndTranslate();
100     testTranslation();
101   }
102
103   @Test
104   public void testTranslateVMIToNetSharedAddOnConnection() throws Exception {
105     inputFilesPath = "/mock/services/heattotosca/VMInterfaceToNettworkConnection/sharedAddOn/inputfiles";
106     outputFilesPath =
107             "/mock/services/heattotosca/VMInterfaceToNettworkConnection/sharedAddOn/expectedoutputfiles";
108     initTranslatorAndTranslate();
109     testTranslation();
110   }
111
112   @Test
113   public void testTranslateVlanToNetSharedAddOnConnection() throws Exception {
114     inputFilesPath = "/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/inputfiles";
115     outputFilesPath =
116         "/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/expectedoutputfiles";
117     initTranslatorAndTranslate();
118     testTranslation();
119   }
120
121   @Test
122   public void testTranslateVMIToNetArrayParameterConnection() throws Exception {
123     inputFilesPath = "/mock/services/heattotosca/VMInterfaceToNettworkConnection/nestedArrayParam/inputfiles";
124     outputFilesPath =
125             "/mock/services/heattotosca/VMInterfaceToNettworkConnection/nestedArrayParam/expectedoutputfiles";
126     initTranslatorAndTranslate();
127     testTranslation();
128   }
129
130 }