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.ui.model;
23 import java.util.List;
26 import org.junit.Test;
27 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
28 import org.openecomp.sdc.be.model.AdditionalInformationDefinition;
29 import org.openecomp.sdc.be.model.ArtifactDefinition;
30 import org.openecomp.sdc.be.model.CapabilityDefinition;
31 import org.openecomp.sdc.be.model.ComponentInstance;
32 import org.openecomp.sdc.be.model.ComponentInstanceInput;
33 import org.openecomp.sdc.be.model.ComponentInstanceProperty;
34 import org.openecomp.sdc.be.model.GroupDefinition;
35 import org.openecomp.sdc.be.model.InputDefinition;
36 import org.openecomp.sdc.be.model.RequirementCapabilityRelDef;
37 import org.openecomp.sdc.be.model.RequirementDefinition;
38 import org.openecomp.sdc.be.model.category.CategoryDefinition;
41 public class UiComponentDataTransferTest {
43 private UiComponentDataTransfer createTestSubject() {
44 return new UiComponentDataTransfer();
49 public void testGetArtifacts() throws Exception {
50 UiComponentDataTransfer testSubject;
51 Map<String, ArtifactDefinition> result;
54 testSubject = createTestSubject();
55 result = testSubject.getArtifacts();
60 public void testSetArtifacts() throws Exception {
61 UiComponentDataTransfer testSubject;
62 Map<String, ArtifactDefinition> artifacts = null;
65 testSubject = createTestSubject();
66 testSubject.setArtifacts(artifacts);
71 public void testGetDeploymentArtifacts() throws Exception {
72 UiComponentDataTransfer testSubject;
73 Map<String, ArtifactDefinition> result;
76 testSubject = createTestSubject();
77 result = testSubject.getDeploymentArtifacts();
82 public void testSetDeploymentArtifacts() throws Exception {
83 UiComponentDataTransfer testSubject;
84 Map<String, ArtifactDefinition> deploymentArtifacts = null;
87 testSubject = createTestSubject();
88 testSubject.setDeploymentArtifacts(deploymentArtifacts);
93 public void testGetToscaArtifacts() throws Exception {
94 UiComponentDataTransfer testSubject;
95 Map<String, ArtifactDefinition> result;
98 testSubject = createTestSubject();
99 result = testSubject.getToscaArtifacts();
104 public void testSetToscaArtifacts() throws Exception {
105 UiComponentDataTransfer testSubject;
106 Map<String, ArtifactDefinition> toscaArtifacts = null;
109 testSubject = createTestSubject();
110 testSubject.setToscaArtifacts(toscaArtifacts);
115 public void testGetCategories() throws Exception {
116 UiComponentDataTransfer testSubject;
117 List<CategoryDefinition> result;
120 testSubject = createTestSubject();
121 result = testSubject.getCategories();
126 public void testSetCategories() throws Exception {
127 UiComponentDataTransfer testSubject;
128 List<CategoryDefinition> categories = null;
131 testSubject = createTestSubject();
132 testSubject.setCategories(categories);
137 public void testGetCreatorUserId() throws Exception {
138 UiComponentDataTransfer testSubject;
142 testSubject = createTestSubject();
143 result = testSubject.getCreatorUserId();
148 public void testSetCreatorUserId() throws Exception {
149 UiComponentDataTransfer testSubject;
150 String creatorUserId = "";
153 testSubject = createTestSubject();
154 testSubject.setCreatorUserId(creatorUserId);
159 public void testGetCreatorFullName() throws Exception {
160 UiComponentDataTransfer testSubject;
164 testSubject = createTestSubject();
165 result = testSubject.getCreatorFullName();
170 public void testSetCreatorFullName() throws Exception {
171 UiComponentDataTransfer testSubject;
172 String creatorFullName = "";
175 testSubject = createTestSubject();
176 testSubject.setCreatorFullName(creatorFullName);
181 public void testGetLastUpdaterUserId() throws Exception {
182 UiComponentDataTransfer testSubject;
186 testSubject = createTestSubject();
187 result = testSubject.getLastUpdaterUserId();
192 public void testSetLastUpdaterUserId() throws Exception {
193 UiComponentDataTransfer testSubject;
194 String lastUpdaterUserId = "";
197 testSubject = createTestSubject();
198 testSubject.setLastUpdaterUserId(lastUpdaterUserId);
203 public void testGetLastUpdaterFullName() throws Exception {
204 UiComponentDataTransfer testSubject;
208 testSubject = createTestSubject();
209 result = testSubject.getLastUpdaterFullName();
214 public void testSetLastUpdaterFullName() throws Exception {
215 UiComponentDataTransfer testSubject;
216 String lastUpdaterFullName = "";
219 testSubject = createTestSubject();
220 testSubject.setLastUpdaterFullName(lastUpdaterFullName);
225 public void testGetComponentType() throws Exception {
226 UiComponentDataTransfer testSubject;
227 ComponentTypeEnum result;
230 testSubject = createTestSubject();
231 result = testSubject.getComponentType();
236 public void testSetComponentType() throws Exception {
237 UiComponentDataTransfer testSubject;
238 ComponentTypeEnum componentType = null;
241 testSubject = createTestSubject();
242 testSubject.setComponentType(componentType);
247 public void testGetComponentInstances() throws Exception {
248 UiComponentDataTransfer testSubject;
249 List<ComponentInstance> result;
252 testSubject = createTestSubject();
253 result = testSubject.getComponentInstances();
258 public void testSetComponentInstances() throws Exception {
259 UiComponentDataTransfer testSubject;
260 List<ComponentInstance> componentInstances = null;
263 testSubject = createTestSubject();
264 testSubject.setComponentInstances(componentInstances);
269 public void testGetComponentInstancesRelations() throws Exception {
270 UiComponentDataTransfer testSubject;
271 List<RequirementCapabilityRelDef> result;
274 testSubject = createTestSubject();
275 result = testSubject.getComponentInstancesRelations();
280 public void testSetComponentInstancesRelations() throws Exception {
281 UiComponentDataTransfer testSubject;
282 List<RequirementCapabilityRelDef> componentInstancesRelations = null;
285 testSubject = createTestSubject();
286 testSubject.setComponentInstancesRelations(componentInstancesRelations);
291 public void testGetComponentInstancesInputs() throws Exception {
292 UiComponentDataTransfer testSubject;
293 Map<String, List<ComponentInstanceInput>> result;
296 testSubject = createTestSubject();
297 result = testSubject.getComponentInstancesInputs();
302 public void testSetComponentInstancesInputs() throws Exception {
303 UiComponentDataTransfer testSubject;
304 Map<String, List<ComponentInstanceInput>> componentInstancesInputs = null;
307 testSubject = createTestSubject();
308 testSubject.setComponentInstancesInputs(componentInstancesInputs);
313 public void testGetComponentInstancesProperties() throws Exception {
314 UiComponentDataTransfer testSubject;
315 Map<String, List<ComponentInstanceProperty>> result;
318 testSubject = createTestSubject();
319 result = testSubject.getComponentInstancesProperties();
324 public void testSetComponentInstancesProperties() throws Exception {
325 UiComponentDataTransfer testSubject;
326 Map<String, List<ComponentInstanceProperty>> componentInstancesProperties = null;
329 testSubject = createTestSubject();
330 testSubject.setComponentInstancesProperties(componentInstancesProperties);
335 public void testGetComponentInstancesAttributes() throws Exception {
336 UiComponentDataTransfer testSubject;
337 Map<String, List<ComponentInstanceProperty>> result;
340 testSubject = createTestSubject();
341 result = testSubject.getComponentInstancesAttributes();
346 public void testSetComponentInstancesAttributes() throws Exception {
347 UiComponentDataTransfer testSubject;
348 Map<String, List<ComponentInstanceProperty>> componentInstancesAttributes = null;
351 testSubject = createTestSubject();
352 testSubject.setComponentInstancesAttributes(componentInstancesAttributes);
357 public void testGetCapabilities() throws Exception {
358 UiComponentDataTransfer testSubject;
359 Map<String, List<CapabilityDefinition>> result;
362 testSubject = createTestSubject();
363 result = testSubject.getCapabilities();
368 public void testSetCapabilities() throws Exception {
369 UiComponentDataTransfer testSubject;
370 Map<String, List<CapabilityDefinition>> capabilities = null;
373 testSubject = createTestSubject();
374 testSubject.setCapabilities(capabilities);
379 public void testGetRequirements() throws Exception {
380 UiComponentDataTransfer testSubject;
381 Map<String, List<RequirementDefinition>> result;
384 testSubject = createTestSubject();
385 result = testSubject.getRequirements();
390 public void testSetRequirements() throws Exception {
391 UiComponentDataTransfer testSubject;
392 Map<String, List<RequirementDefinition>> requirements = null;
395 testSubject = createTestSubject();
396 testSubject.setRequirements(requirements);
401 public void testGetInputs() throws Exception {
402 UiComponentDataTransfer testSubject;
403 List<InputDefinition> result;
406 testSubject = createTestSubject();
407 result = testSubject.getInputs();
412 public void testSetInputs() throws Exception {
413 UiComponentDataTransfer testSubject;
414 List<InputDefinition> inputs = null;
417 testSubject = createTestSubject();
418 testSubject.setInputs(inputs);
423 public void testGetGroups() throws Exception {
424 UiComponentDataTransfer testSubject;
425 List<GroupDefinition> result;
428 testSubject = createTestSubject();
429 result = testSubject.getGroups();
434 public void testSetGroups() throws Exception {
435 UiComponentDataTransfer testSubject;
436 List<GroupDefinition> groups = null;
439 testSubject = createTestSubject();
440 testSubject.setGroups(groups);
445 public void testGetAdditionalInformation() throws Exception {
446 UiComponentDataTransfer testSubject;
447 List<AdditionalInformationDefinition> result;
450 testSubject = createTestSubject();
451 result = testSubject.getAdditionalInformation();
456 public void testSetAdditionalInformation() throws Exception {
457 UiComponentDataTransfer testSubject;
458 List<AdditionalInformationDefinition> additionalInformation = null;
461 testSubject = createTestSubject();
462 testSubject.setAdditionalInformation(additionalInformation);