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.*;
26 import java.util.LinkedList;
27 import java.util.List;
30 public class DataForMergeHolderTest {
32 private DataForMergeHolder createTestSubject() {
33 return new DataForMergeHolder();
37 public void testGetOrigComponentInstanceHeatEnvArtifacts() throws Exception {
38 DataForMergeHolder testSubject;
39 List<ArtifactDefinition> result;
42 testSubject = createTestSubject();
43 result = testSubject.getOrigComponentInstanceHeatEnvArtifacts();
47 public void testSetOrigComponentInstanceHeatEnvArtifacts() throws Exception {
48 DataForMergeHolder testSubject;
49 List<ArtifactDefinition> origComponentInstanceHeatEnvArtifacts = null;
52 testSubject = createTestSubject();
53 testSubject.setOrigComponentInstanceHeatEnvArtifacts(origComponentInstanceHeatEnvArtifacts);
57 public void testGetOrigComponentInstanceInputs() throws Exception {
58 DataForMergeHolder testSubject;
59 List<ComponentInstanceInput> result;
62 testSubject = createTestSubject();
63 result = testSubject.getOrigComponentInstanceInputs();
67 public void testSetOrigComponentInstanceInputs() throws Exception {
68 DataForMergeHolder testSubject;
69 List<ComponentInstanceInput> origComponentInstanceInputs = new LinkedList<>();
70 ComponentInstanceInput e = new ComponentInstanceInput();
71 origComponentInstanceInputs.add(e);
74 testSubject = createTestSubject();
75 testSubject.setOrigComponentInstanceInputs(origComponentInstanceInputs);
79 public void testGetOrigComponentInstanceProperties() throws Exception {
80 DataForMergeHolder testSubject;
81 List<ComponentInstanceProperty> result;
84 testSubject = createTestSubject();
85 result = testSubject.getOrigComponentInstanceProperties();
89 public void testSetOrigComponentInstanceProperties() throws Exception {
90 DataForMergeHolder testSubject;
91 List<ComponentInstanceProperty> origComponentInstanceProperties = new LinkedList<>();
92 ComponentInstanceProperty e = new ComponentInstanceProperty();
93 origComponentInstanceProperties.add(e);
95 testSubject = createTestSubject();
96 testSubject.setOrigComponentInstanceProperties(origComponentInstanceProperties);
100 public void testGetOrigComponentInputs() throws Exception {
101 DataForMergeHolder testSubject;
102 List<InputDefinition> result;
105 testSubject = createTestSubject();
106 result = testSubject.getOrigComponentInputs();
110 public void testSetOrigComponentInputs() throws Exception {
111 DataForMergeHolder testSubject;
112 List<InputDefinition> origComponentInputs = null;
115 testSubject = createTestSubject();
116 testSubject.setOrigComponentInputs(origComponentInputs);
120 public void testGetOrigComponentDeploymentArtifactsCreatedOnTheInstance() throws Exception {
121 DataForMergeHolder testSubject;
122 Map<String, ArtifactDefinition> result;
125 testSubject = createTestSubject();
126 result = testSubject.getOrigComponentDeploymentArtifactsCreatedOnTheInstance();
130 public void testGetOrigComponentInformationalArtifactsCreatedOnTheInstance() throws Exception {
131 DataForMergeHolder testSubject;
132 Map<String, ArtifactDefinition> result;
135 testSubject = createTestSubject();
136 result = testSubject.getOrigComponentInformationalArtifactsCreatedOnTheInstance();
140 public void testSetOrigComponentDeploymentArtifactsCreatedOnTheInstance() throws Exception {
141 DataForMergeHolder testSubject;
142 Map<String, ArtifactDefinition> origDeploymentArtifacts = null;
145 testSubject = createTestSubject();
146 testSubject.setOrigComponentDeploymentArtifactsCreatedOnTheInstance(origDeploymentArtifacts);
150 public void testSetOrigComponentInformationalArtifactsCreatedOnTheInstance() throws Exception {
151 DataForMergeHolder testSubject;
152 Map<String, ArtifactDefinition> origInformationalArtifacts = null;
155 testSubject = createTestSubject();
156 testSubject.setOrigComponentInformationalArtifactsCreatedOnTheInstance(origInformationalArtifacts);
160 public void testSetVfRelationsInfo() throws Exception {
161 DataForMergeHolder testSubject;
162 ContainerRelationsMergeInfo vfRelationsMergeInfo = null;
165 testSubject = createTestSubject();
166 testSubject.setVfRelationsInfo(vfRelationsMergeInfo);
170 public void testGetVfRelationsMergeInfo() throws Exception {
171 DataForMergeHolder testSubject;
172 ContainerRelationsMergeInfo result;
175 testSubject = createTestSubject();
176 result = testSubject.getContainerRelationsMergeInfo();
180 public void testGetOrigInstanceCapabilities() throws Exception {
181 DataForMergeHolder testSubject;
182 List<CapabilityDefinition> result;
185 testSubject = createTestSubject();
186 result = testSubject.getOrigInstanceCapabilities();
190 public void testSetOrigInstanceCapabilities() throws Exception {
191 DataForMergeHolder testSubject;
192 List<CapabilityDefinition> origInstanceCapabilities = null;
195 testSubject = createTestSubject();
196 testSubject.setOrigInstanceCapabilities(origInstanceCapabilities);
200 public void testGetOrigInstanceNode() throws Exception {
201 DataForMergeHolder testSubject;
205 testSubject = createTestSubject();
206 result = testSubject.getOrigInstanceNode();
210 public void testSetOrigInstanceNode() throws Exception {
211 DataForMergeHolder testSubject;
212 Component origInstanceNode = null;
215 testSubject = createTestSubject();
216 testSubject.setOrigInstanceNode(origInstanceNode);
220 public void testGetOrigComponentInstId() throws Exception {
221 DataForMergeHolder testSubject;
225 testSubject = createTestSubject();
226 result = testSubject.getOrigComponentInstId();
230 public void testSetOrigComponentInstId() throws Exception {
231 DataForMergeHolder testSubject;
232 String origComponentInstId = "";
235 testSubject = createTestSubject();
236 testSubject.setOrigComponentInstId(origComponentInstId);