[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / java / org / openecomp / sdc / translator / services / heattotosca / impl / resourcetranslation / ContrailV2VmInterfaceToNetResourceConnectionTest.java
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   //todo - remove the ignore once we will support VMI as sub port
47   @Ignore
48   @Test
49   public void testTranslateVlanToNetNestedConnection() throws Exception {
50     inputFilesPath = "/mock/services/heattotosca/VlanToNetConnection/nested/inputfiles";
51     outputFilesPath =
52         "/mock/services/heattotosca/VlanToNetConnection/nested/expectedoutputfiles";
53     initTranslatorAndTranslate();
54     testTranslation();
55   }
56
57   @Test
58   public void testTranslateVMIToNetMultiNestedConnection() throws Exception {
59     inputFilesPath =
60         "/mock/services/heattotosca/VMInterfaceToNettworkConnection/nestedMultiLevels/inputfiles";
61     outputFilesPath =
62         "/mock/services/heattotosca/VMInterfaceToNettworkConnection/nestedMultiLevels/expectedoutputfiles";
63     initTranslatorAndTranslate();
64     testTranslation();
65   }
66
67   //todo - remove the ignore once we will support VMI as sub port
68   @Ignore
69   @Test
70   public void testTranslateVlanToNetMultiNestedConnection() throws Exception {
71     inputFilesPath =
72         "/mock/services/heattotosca/VlanToNetConnection/nestedMultiLevels/inputfiles";
73     outputFilesPath =
74         "/mock/services/heattotosca/VlanToNetConnection/nestedMultiLevels/expectedoutputfiles";
75     initTranslatorAndTranslate();
76     testTranslation();
77   }
78
79   @Test
80   public void testTranslateVMIToSharedNetNestedConnection() throws Exception {
81     inputFilesPath = "/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles";
82     outputFilesPath =
83         "/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles";
84     initTranslatorAndTranslate();
85     testTranslation();
86   }
87
88   //todo - remove the ignore once we will support VMI as sub port
89   @Ignore
90   @Test
91   public void testTranslateVlanToSharedNetNestedConnection() throws Exception {
92     inputFilesPath = "/mock/services/heattotosca/VlanToNetConnection/shared/inputfiles";
93     outputFilesPath =
94         "/mock/services/heattotosca/VlanToNetConnection/shared/expectedoutputfiles";
95     initTranslatorAndTranslate();
96     testTranslation();
97   }
98
99   @Test
100   public void testTranslateVMIToNetSharedMultiNestedConnection() throws Exception {
101     inputFilesPath =
102         "/mock/services/heattotosca/VMInterfaceToNettworkConnection/sharedNestedMultiLevels/inputfiles";
103     outputFilesPath =
104         "/mock/services/heattotosca/VMInterfaceToNettworkConnection/sharedNestedMultiLevels/expectedoutputfiles";
105     initTranslatorAndTranslate();
106     testTranslation();
107   }
108
109   @Test
110   public void testTranslateVMIToNetSharedAddOnConnection() throws Exception {
111     inputFilesPath = "/mock/services/heattotosca/VMInterfaceToNettworkConnection/sharedAddOn/inputfiles";
112     outputFilesPath =
113             "/mock/services/heattotosca/VMInterfaceToNettworkConnection/sharedAddOn/expectedoutputfiles";
114     initTranslatorAndTranslate();
115     testTranslation();
116   }
117
118   //todo - remove the ignore once we will support VMI as sub port
119   @Ignore
120   @Test
121   public void testTranslateVlanToNetSharedAddOnConnection() throws Exception {
122     inputFilesPath = "/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/inputfiles";
123     outputFilesPath =
124         "/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/expectedoutputfiles";
125     initTranslatorAndTranslate();
126     testTranslation();
127   }
128
129   @Test
130   public void testTranslateVMIToNetArrayParameterConnection() throws Exception {
131     inputFilesPath = "/mock/services/heattotosca/VMInterfaceToNettworkConnection/nestedArrayParam/inputfiles";
132     outputFilesPath =
133             "/mock/services/heattotosca/VMInterfaceToNettworkConnection/nestedArrayParam/expectedoutputfiles";
134     initTranslatorAndTranslate();
135     testTranslation();
136   }
137
138 }