[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 / ResourceTranslationContrailV2Test.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.Test;
25
26 import java.io.IOException;
27
28 public class ResourceTranslationContrailV2Test extends BaseResourceTranslationTest {
29
30   @Override
31   @Before
32   public void setUp() throws IOException {
33     // do not delete this function. it prevents the superclass setup from running
34   }
35
36   @Test
37   public void testTranslate() throws Exception {
38     inputFilesPath = "/mock/services/heattotosca/ContrailV2_translation/simple/inputfiles";
39     outputFilesPath =
40         "/mock/services/heattotosca/ContrailV2_translation/simple/expectedoutputfiles";
41     initTranslatorAndTranslate();
42     testTranslation();
43   }
44
45   @Test
46   public void testMultiPolicySingleNetTranslate() throws Exception {
47     inputFilesPath =
48         "/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/inputfiles";
49     outputFilesPath =
50         "/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/expectedoutputfiles";
51     initTranslatorAndTranslate();
52     testTranslation();
53   }
54
55   @Test
56   public void testMultiNetSinglePolicyTranslate() throws Exception {
57     inputFilesPath =
58         "/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/inputfiles";
59     outputFilesPath =
60         "/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/expectedoutputfiles";
61     initTranslatorAndTranslate();
62     testTranslation();
63   }
64
65   @Test
66   public void testInvalidPolicyResourceTypeTranslate() throws Exception {
67     inputFilesPath =
68         "/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/inputfiles";
69     outputFilesPath =
70         "/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/expectedoutputfiles";
71     initTranslatorAndTranslate();
72     testTranslation();
73   }
74
75
76 }