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