2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
20 package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
22 import org.junit.Test;
23 import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
25 import java.io.IOException;
27 public class UnifiedCompositionSingleSubstitutionFullTest extends BaseFullTranslationTest {
29 private static final String BASE_DIRECTORY = "/mock/services/heattotosca/fulltest/singleSubstitution/";
32 public void testComputeWithTwoDifferentPortTypes() throws IOException {
33 testTranslationWithInit(BASE_DIRECTORY + "computeWithDiffPortType");
37 public void testComputeWithTwoSamePortTypes() throws IOException {
38 testTranslationWithInit(BASE_DIRECTORY + "computewithtwosameporttypes");
42 public void testComputeWithTwoSamePortTypes2() throws IOException {
43 testTranslationWithInit(BASE_DIRECTORY + "computewithtwosameporttypes2");
47 public void testComputeWithTwoSamePortTypes3() throws IOException {
48 testTranslationWithInit(BASE_DIRECTORY + "computewithtwosameporttypes3");
52 public void testComputeWithTwoSamePortTypes4() throws IOException {
53 testTranslationWithInit(BASE_DIRECTORY + "computewithtwosameporttypes4");
57 public void testComputeWithTwoDifferentPortTypesAndNested() throws IOException {
58 testTranslationWithInit(BASE_DIRECTORY + "computewithtwodiffporttypesandnested");
62 public void testComputeWithTwoDifferentPortAndServerGroup() throws IOException {
63 testTranslationWithInit(BASE_DIRECTORY + "computeWithDiffPortTypeAndServerGroup");
67 public void testComputeWithTwoPortsDiffTypeAndNodeConnectedIn() throws IOException {
68 testTranslationWithInit(BASE_DIRECTORY + "computeWithDiffPortTypeNodeConnectedIn");
72 public void testComputeWithTwoPortsSameTypeAndNodeConnectedIn() throws IOException {
73 testTranslationWithInit(BASE_DIRECTORY + "computeWithSamePortTypeNodeConnectedIn");
77 public void testComputeWithTwoPortsDiffTypeAndNodeConnectedOut() throws IOException {
78 testTranslationWithInit(BASE_DIRECTORY + "computeWithDiffPortTypeNodeConnectedOut");
82 public void testComputeWithTwoPortsSameTypeAndNodeConnectedOut() throws IOException {
83 testTranslationWithInit(BASE_DIRECTORY + "computeWithSamePortTypeNodeConnectedOut");
87 public void testComputeWithTwoDifferentPortTypesAndOutParamGetAttIn() throws IOException {
88 testTranslationWithInit(BASE_DIRECTORY + "diffPortTypeAndOutParamGetAttrIn");
92 public void testComputeWithTwoSamePortTypesAndOutParamGetAttIn() throws IOException {
93 testTranslationWithInit(BASE_DIRECTORY + "samePortTypeAndOutParamGetAttrIn");
97 // public void testGeneralVf() throws IOException {
99 // "/mock/services/heattotosca/fulltest/singleSubstitution/generalVf/in";
101 // "/mock/services/heattotosca/fulltest/singleSubstitution/generalVf/out";
103 // testTranslationWithInit();
107 public void testTwoSetsOfSingle() throws IOException {
108 testTranslationWithInit(BASE_DIRECTORY + "twoSetsOfSingle");
112 public void testTwoSetsOfSingleWithGetAttrBetweenThem() throws IOException {
113 testTranslationWithInit(BASE_DIRECTORY + "twoComputesWithGetAttrBetweenThem");
117 public void testOneComputeTwoDiffPortsAndGetAttrIn() throws IOException {
118 testTranslationWithInit(BASE_DIRECTORY + "oneComputeDiffPortTypesAndGetAttIn");
122 public void testOneComputeTwoSimilarPortsAndGetAttrIn() throws IOException {
123 testTranslationWithInit(BASE_DIRECTORY + "oneComputeSamePortsAndGetAttrIn");
127 public void testOneComputeTwoDiffPortsAndGetAttrOut() throws IOException {
128 testTranslationWithInit(BASE_DIRECTORY + "oneComputeDiffPortTypesAndGetAttOut");
132 public void testOneComputeTwoSimilarPortsAndGetAttrOut() throws IOException {
133 testTranslationWithInit(BASE_DIRECTORY + "oneComputeSamePortTypesAndGetAttOut");
137 public void testThreeNovaSameTypeNoConsolidation() throws IOException {
138 testTranslationWithInit(BASE_DIRECTORY + "threeSameComputesNoConsolidation");
142 public void testThreeNovaDiffTypeWithPorts() throws IOException {
143 testTranslationWithInit(BASE_DIRECTORY + "threeDiffComputesWithPorts");
147 public void testThreeNovaDiffTypeWithAllConnectivities() throws IOException {
148 testTranslationWithInit(BASE_DIRECTORY + "threeDiffComputesWithAllConnectivities");
152 public void testThreeNovaSameTypeWithGetAttrOutFromPort() throws IOException {
153 testTranslationWithInit(BASE_DIRECTORY + "threeNovaSameTypeWithGetAttrFromPort");
157 public void testInputOutputParameterTypes() throws IOException {
158 testTranslationWithInit(BASE_DIRECTORY + "inputOutputParamType");