1 package org.openecomp.sdc.be.model;
4 import org.openecomp.sdc.be.datatypes.elements.ComponentInstanceDataDefinition;
5 import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum;
10 public class ComponentInstanceTest {
12 private ComponentInstance createTestSubject() {
13 return new ComponentInstance();
17 public void testCtor() throws Exception {
18 new ComponentInstance(new ComponentInstanceDataDefinition());
22 public void testGetCapabilities() throws Exception {
23 ComponentInstance testSubject;
24 Map<String, List<CapabilityDefinition>> result;
27 testSubject = createTestSubject();
28 result = testSubject.getCapabilities();
32 public void testSetCapabilities() throws Exception {
33 ComponentInstance testSubject;
34 Map<String, List<CapabilityDefinition>> capabilities = null;
37 testSubject = createTestSubject();
38 testSubject.setCapabilities(capabilities);
42 public void testGetRequirements() throws Exception {
43 ComponentInstance testSubject;
44 Map<String, List<RequirementDefinition>> result;
47 testSubject = createTestSubject();
48 result = testSubject.getRequirements();
52 public void testSetRequirements() throws Exception {
53 ComponentInstance testSubject;
54 Map<String, List<RequirementDefinition>> requirements = null;
57 testSubject = createTestSubject();
58 testSubject.setRequirements(requirements);
62 public void testGetDeploymentArtifacts() throws Exception {
63 ComponentInstance testSubject;
64 Map<String, ArtifactDefinition> result;
67 testSubject = createTestSubject();
68 result = testSubject.getDeploymentArtifacts();
72 public void testSafeGetDeploymentArtifacts() throws Exception {
73 ComponentInstance testSubject;
74 Map<String, ArtifactDefinition> result;
77 testSubject = createTestSubject();
78 result = testSubject.safeGetDeploymentArtifacts();
82 public void testSafeGetInformationalArtifacts() throws Exception {
83 ComponentInstance testSubject;
84 Map<String, ArtifactDefinition> result;
87 testSubject = createTestSubject();
88 result = testSubject.safeGetInformationalArtifacts();
92 public void testSetDeploymentArtifacts() throws Exception {
93 ComponentInstance testSubject;
94 Map<String, ArtifactDefinition> deploymentArtifacts = null;
97 testSubject = createTestSubject();
98 testSubject.setDeploymentArtifacts(deploymentArtifacts);
102 public void testGetArtifacts() throws Exception {
103 ComponentInstance testSubject;
104 Map<String, ArtifactDefinition> result;
107 testSubject = createTestSubject();
108 result = testSubject.getArtifacts();
112 public void testSafeGetArtifacts() throws Exception {
113 ComponentInstance testSubject;
114 Map<String, ArtifactDefinition> result;
117 testSubject = createTestSubject();
118 result = testSubject.safeGetArtifacts();
122 public void testSetArtifacts() throws Exception {
123 ComponentInstance testSubject;
124 Map<String, ArtifactDefinition> artifacts = null;
127 testSubject = createTestSubject();
128 testSubject.setArtifacts(artifacts);
132 public void testGetGroupInstances() throws Exception {
133 ComponentInstance testSubject;
134 List<GroupInstance> result;
137 testSubject = createTestSubject();
138 result = testSubject.getGroupInstances();
142 public void testSetGroupInstances() throws Exception {
143 ComponentInstance testSubject;
144 List<GroupInstance> groupInstances = null;
147 testSubject = createTestSubject();
148 testSubject.setGroupInstances(groupInstances);
152 public void testGetActualComponentUid() throws Exception {
153 ComponentInstance testSubject;
157 testSubject = createTestSubject();
158 result = testSubject.getActualComponentUid();
162 public void testIsArtifactExists() throws Exception {
163 ComponentInstance testSubject;
164 ArtifactGroupTypeEnum groupType = null;
165 String artifactLabel = "";
169 testSubject = createTestSubject();
170 result = testSubject.isArtifactExists(groupType, artifactLabel);
171 testSubject = createTestSubject();
172 result = testSubject.isArtifactExists(ArtifactGroupTypeEnum.DEPLOYMENT, artifactLabel);