2 * ============LICENSE_START=======================================================
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
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=========================================================
21 package org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation;
23 import org.junit.Before;
24 import org.junit.Test;
26 import java.io.IOException;
29 public class NovaToVolResourceConnectionTest extends BaseResourceTranslationTest {
32 public void setUp() throws IOException {
33 // do not delete this function. it prevents the superclass setup from running
37 public void testNovaToVolumeConnectionSharedAddOnConnection() throws Exception {
38 inputFilesPath = "/mock/services/heattotosca/novatovolumeconnection/sharedAddOn/inputfiles";
40 "/mock/services/heattotosca/novatovolumeconnection/sharedAddOn/expectedoutputfiles";
41 initTranslatorAndTranslate();
46 public void testNovaToVolumeConnectionMultiNotCreatedIfVolPorpertyInVolAttacheIsNotAReferenceToVolume()
49 "/mock/services/heattotosca/novatovolumeconnection/multinotconnected/inputfiles";
51 "/mock/services/heattotosca/novatovolumeconnection/multinotconnected/expectedoutputfiles";
52 initTranslatorAndTranslate();
57 public void testNovaToVolumeConnectionNestedNotCreatedIfVolPorpertyInVolAttacheIsNotAReferenceToVolume()
60 "/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/inputfiles";
62 "/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles";
63 initTranslatorAndTranslate();
65 validateNodeTemplateIdInNestedConsolidationData();
69 public void testTranslateNovaToVolumeNestedConnection() throws Exception {
71 "/mock/services/heattotosca/novatovolumeconnection/nestedconnection/inputfiles";
73 "/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles";
74 initTranslatorAndTranslate();
76 validateNodeTemplateIdInNestedConsolidationData();
80 public void testTranslateNovaToVolumeSharedNestedConnection() throws Exception {
82 "/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles";
84 "/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/expectedoutputfiles";
85 initTranslatorAndTranslate();
87 validateNodeTemplateIdInNestedConsolidationData();
91 public void testTranslateNovaToVolumeSharedNestedNotCreatedIfVolPorpertyInVolAttacheIsNotAReferenceToVolume()
94 "/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles";
96 "/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/expectedoutputfiles";
97 initTranslatorAndTranslate();
99 validateNodeTemplateIdInNestedConsolidationData();
103 public void testTranslateNovaToVolumeInnerNestedConnection() throws Exception {
105 "/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles";
107 "/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/expectedoutputfiles";
108 initTranslatorAndTranslate();
110 validateNodeTemplateIdInNestedConsolidationData();
114 public void testTranslateNovaToVolumeNestedMultiLevelConnection() throws Exception {
116 "/mock/services/heattotosca/novatovolumeconnection/nestedMultiLevels/inputfiles";
118 "/mock/services/heattotosca/novatovolumeconnection/nestedMultiLevels/expectedoutputfiles";
119 initTranslatorAndTranslate();
121 validateNodeTemplateIdInNestedConsolidationData();
125 public void testTranslateNovaToVolumeSharedNestedMultiLevelConnection() throws Exception {
127 "/mock/services/heattotosca/novatovolumeconnection/sharedNestedMultiLevels/inputfiles";
129 "/mock/services/heattotosca/novatovolumeconnection/sharedNestedMultiLevels/expectedoutputfiles";
130 initTranslatorAndTranslate();
132 validateNodeTemplateIdInNestedConsolidationData();
136 public void testTranslateNovaToVolumeInnerHeatVolumeNestedMultiLevelConnection()
139 "/mock/services/heattotosca/novatovolumeconnection/innerHeatVolNestedMultiLevel/inputfiles";
141 "/mock/services/heattotosca/novatovolumeconnection/innerHeatVolNestedMultiLevel/expectedoutputfiles";
142 initTranslatorAndTranslate();
144 validateNodeTemplateIdInNestedConsolidationData();