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=========================================================
21 package org.openecomp.sdc.be.components.merge.instance;
23 import org.junit.Test;
24 import org.openecomp.sdc.be.model.ArtifactDefinition;
25 import org.openecomp.sdc.be.model.CapabilityDefinition;
26 import org.openecomp.sdc.be.model.Component;
27 import org.openecomp.sdc.be.model.ComponentInstanceInput;
28 import org.openecomp.sdc.be.model.ComponentInstanceProperty;
29 import org.openecomp.sdc.be.model.InputDefinition;
31 import java.util.LinkedList;
32 import java.util.List;
35 public class DataForMergeHolderTest {
37 private DataForMergeHolder createTestSubject() {
38 return new DataForMergeHolder();
42 public void testGetOrigComponentInstanceHeatEnvArtifacts() throws Exception {
43 DataForMergeHolder testSubject;
44 List<ArtifactDefinition> result;
47 testSubject = createTestSubject();
48 result = testSubject.getOrigComponentInstanceHeatEnvArtifacts();
52 public void testSetOrigComponentInstanceHeatEnvArtifacts() throws Exception {
53 DataForMergeHolder testSubject;
54 List<ArtifactDefinition> origComponentInstanceHeatEnvArtifacts = null;
57 testSubject = createTestSubject();
58 testSubject.setOrigComponentInstanceHeatEnvArtifacts(origComponentInstanceHeatEnvArtifacts);
62 public void testGetOrigComponentInstanceInputs() throws Exception {
63 DataForMergeHolder testSubject;
64 List<ComponentInstanceInput> result;
67 testSubject = createTestSubject();
68 result = testSubject.getOrigComponentInstanceInputs();
72 public void testSetOrigComponentInstanceInputs() throws Exception {
73 DataForMergeHolder testSubject;
74 List<ComponentInstanceInput> origComponentInstanceInputs = new LinkedList<>();
75 ComponentInstanceInput e = new ComponentInstanceInput();
76 origComponentInstanceInputs.add(e);
79 testSubject = createTestSubject();
80 testSubject.setOrigComponentInstanceInputs(origComponentInstanceInputs);
84 public void testGetOrigComponentInstanceProperties() throws Exception {
85 DataForMergeHolder testSubject;
86 List<ComponentInstanceProperty> result;
89 testSubject = createTestSubject();
90 result = testSubject.getOrigComponentInstanceProperties();
94 public void testSetOrigComponentInstanceProperties() throws Exception {
95 DataForMergeHolder testSubject;
96 List<ComponentInstanceProperty> origComponentInstanceProperties = new LinkedList<>();
97 ComponentInstanceProperty e = new ComponentInstanceProperty();
98 origComponentInstanceProperties.add(e);
100 testSubject = createTestSubject();
101 testSubject.setOrigComponentInstanceProperties(origComponentInstanceProperties);
105 public void testGetOrigComponentInputs() throws Exception {
106 DataForMergeHolder testSubject;
107 List<InputDefinition> result;
110 testSubject = createTestSubject();
111 result = testSubject.getOrigComponentInputs();
115 public void testSetOrigComponentInputs() throws Exception {
116 DataForMergeHolder testSubject;
117 List<InputDefinition> origComponentInputs = null;
120 testSubject = createTestSubject();
121 testSubject.setOrigComponentInputs(origComponentInputs);
125 public void testGetOrigComponentDeploymentArtifactsCreatedOnTheInstance() throws Exception {
126 DataForMergeHolder testSubject;
127 Map<String, ArtifactDefinition> result;
130 testSubject = createTestSubject();
131 result = testSubject.getOrigComponentDeploymentArtifactsCreatedOnTheInstance();
135 public void testGetOrigComponentInformationalArtifactsCreatedOnTheInstance() throws Exception {
136 DataForMergeHolder testSubject;
137 Map<String, ArtifactDefinition> result;
140 testSubject = createTestSubject();
141 result = testSubject.getOrigComponentInformationalArtifactsCreatedOnTheInstance();
145 public void testSetOrigComponentDeploymentArtifactsCreatedOnTheInstance() throws Exception {
146 DataForMergeHolder testSubject;
147 Map<String, ArtifactDefinition> origDeploymentArtifacts = null;
150 testSubject = createTestSubject();
151 testSubject.setOrigComponentDeploymentArtifactsCreatedOnTheInstance(origDeploymentArtifacts);
155 public void testSetOrigComponentInformationalArtifactsCreatedOnTheInstance() throws Exception {
156 DataForMergeHolder testSubject;
157 Map<String, ArtifactDefinition> origInformationalArtifacts = null;
160 testSubject = createTestSubject();
161 testSubject.setOrigComponentInformationalArtifactsCreatedOnTheInstance(origInformationalArtifacts);
165 public void testSetVfRelationsInfo() throws Exception {
166 DataForMergeHolder testSubject;
167 ContainerRelationsMergeInfo vfRelationsMergeInfo = null;
170 testSubject = createTestSubject();
171 testSubject.setVfRelationsInfo(vfRelationsMergeInfo);
175 public void testGetVfRelationsMergeInfo() throws Exception {
176 DataForMergeHolder testSubject;
177 ContainerRelationsMergeInfo result;
180 testSubject = createTestSubject();
181 result = testSubject.getContainerRelationsMergeInfo();
185 public void testGetOrigInstanceCapabilities() throws Exception {
186 DataForMergeHolder testSubject;
187 List<CapabilityDefinition> result;
190 testSubject = createTestSubject();
191 result = testSubject.getOrigInstanceCapabilities();
195 public void testSetOrigInstanceCapabilities() throws Exception {
196 DataForMergeHolder testSubject;
197 List<CapabilityDefinition> origInstanceCapabilities = null;
200 testSubject = createTestSubject();
201 testSubject.setOrigInstanceCapabilities(origInstanceCapabilities);
205 public void testGetOrigInstanceNode() throws Exception {
206 DataForMergeHolder testSubject;
210 testSubject = createTestSubject();
211 result = testSubject.getOrigInstanceNode();
215 public void testSetOrigInstanceNode() throws Exception {
216 DataForMergeHolder testSubject;
217 Component origInstanceNode = null;
220 testSubject = createTestSubject();
221 testSubject.setOrigInstanceNode(origInstanceNode);
225 public void testGetOrigComponentInstId() throws Exception {
226 DataForMergeHolder testSubject;
230 testSubject = createTestSubject();
231 result = testSubject.getOrigComponentInstId();
235 public void testSetOrigComponentInstId() throws Exception {
236 DataForMergeHolder testSubject;
237 String origComponentInstId = "";
240 testSubject = createTestSubject();
241 testSubject.setOrigComponentInstId(origComponentInstId);