re base code
[sdc.git] / catalog-model / src / test / java / org / openecomp / sdc / be / model / ComponentInstanceTest.java
1 package org.openecomp.sdc.be.model;
2
3 import org.junit.Test;
4 import org.openecomp.sdc.be.datatypes.elements.ComponentInstanceDataDefinition;
5 import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum;
6
7 import java.util.List;
8 import java.util.Map;
9
10 public class ComponentInstanceTest {
11
12         private ComponentInstance createTestSubject() {
13                 return new ComponentInstance();
14         }
15
16         @Test
17         public void testCtor() throws Exception {
18                 new ComponentInstance(new ComponentInstanceDataDefinition());
19         }
20         
21         @Test
22         public void testGetCapabilities() throws Exception {
23                 ComponentInstance testSubject;
24                 Map<String, List<CapabilityDefinition>> result;
25
26                 // default test
27                 testSubject = createTestSubject();
28                 result = testSubject.getCapabilities();
29         }
30
31         @Test
32         public void testSetCapabilities() throws Exception {
33                 ComponentInstance testSubject;
34                 Map<String, List<CapabilityDefinition>> capabilities = null;
35
36                 // default test
37                 testSubject = createTestSubject();
38                 testSubject.setCapabilities(capabilities);
39         }
40
41         @Test
42         public void testGetRequirements() throws Exception {
43                 ComponentInstance testSubject;
44                 Map<String, List<RequirementDefinition>> result;
45
46                 // default test
47                 testSubject = createTestSubject();
48                 result = testSubject.getRequirements();
49         }
50
51         @Test
52         public void testSetRequirements() throws Exception {
53                 ComponentInstance testSubject;
54                 Map<String, List<RequirementDefinition>> requirements = null;
55
56                 // default test
57                 testSubject = createTestSubject();
58                 testSubject.setRequirements(requirements);
59         }
60
61         @Test
62         public void testGetDeploymentArtifacts() throws Exception {
63                 ComponentInstance testSubject;
64                 Map<String, ArtifactDefinition> result;
65
66                 // default test
67                 testSubject = createTestSubject();
68                 result = testSubject.getDeploymentArtifacts();
69         }
70
71         @Test
72         public void testSafeGetDeploymentArtifacts() throws Exception {
73                 ComponentInstance testSubject;
74                 Map<String, ArtifactDefinition> result;
75
76                 // default test
77                 testSubject = createTestSubject();
78                 result = testSubject.safeGetDeploymentArtifacts();
79         }
80
81         @Test
82         public void testSafeGetInformationalArtifacts() throws Exception {
83                 ComponentInstance testSubject;
84                 Map<String, ArtifactDefinition> result;
85
86                 // default test
87                 testSubject = createTestSubject();
88                 result = testSubject.safeGetInformationalArtifacts();
89         }
90
91         @Test
92         public void testSetDeploymentArtifacts() throws Exception {
93                 ComponentInstance testSubject;
94                 Map<String, ArtifactDefinition> deploymentArtifacts = null;
95
96                 // default test
97                 testSubject = createTestSubject();
98                 testSubject.setDeploymentArtifacts(deploymentArtifacts);
99         }
100
101         @Test
102         public void testGetArtifacts() throws Exception {
103                 ComponentInstance testSubject;
104                 Map<String, ArtifactDefinition> result;
105
106                 // default test
107                 testSubject = createTestSubject();
108                 result = testSubject.getArtifacts();
109         }
110
111         @Test
112         public void testSafeGetArtifacts() throws Exception {
113                 ComponentInstance testSubject;
114                 Map<String, ArtifactDefinition> result;
115
116                 // default test
117                 testSubject = createTestSubject();
118                 result = testSubject.safeGetArtifacts();
119         }
120
121         @Test
122         public void testSetArtifacts() throws Exception {
123                 ComponentInstance testSubject;
124                 Map<String, ArtifactDefinition> artifacts = null;
125
126                 // default test
127                 testSubject = createTestSubject();
128                 testSubject.setArtifacts(artifacts);
129         }
130
131         @Test
132         public void testGetGroupInstances() throws Exception {
133                 ComponentInstance testSubject;
134                 List<GroupInstance> result;
135
136                 // default test
137                 testSubject = createTestSubject();
138                 result = testSubject.getGroupInstances();
139         }
140
141         @Test
142         public void testSetGroupInstances() throws Exception {
143                 ComponentInstance testSubject;
144                 List<GroupInstance> groupInstances = null;
145
146                 // default test
147                 testSubject = createTestSubject();
148                 testSubject.setGroupInstances(groupInstances);
149         }
150
151         @Test
152         public void testGetActualComponentUid() throws Exception {
153                 ComponentInstance testSubject;
154                 String result;
155
156                 // default test
157                 testSubject = createTestSubject();
158                 result = testSubject.getActualComponentUid();
159         }
160
161         @Test
162         public void testIsArtifactExists() throws Exception {
163                 ComponentInstance testSubject;
164                 ArtifactGroupTypeEnum groupType = null;
165                 String artifactLabel = "";
166                 boolean result;
167
168                 // default test
169                 testSubject = createTestSubject();
170                 result = testSubject.isArtifactExists(groupType, artifactLabel);
171                 testSubject = createTestSubject();
172                 result = testSubject.isArtifactExists(ArtifactGroupTypeEnum.DEPLOYMENT, artifactLabel);
173         }
174 }