1 package org.openecomp.sdc.be.datatypes.elements;
3 import org.junit.Assert;
6 import java.util.LinkedList;
10 public class CapabilityDataDefinitionTest {
12 private CapabilityDataDefinition createTestSubject() {
13 return new CapabilityDataDefinition();
17 public void testCopyConstructor() throws Exception {
18 CapabilityDataDefinition testSubject;
21 testSubject = createTestSubject();
22 new CapabilityDataDefinition(testSubject);
23 testSubject.setValidSourceTypes(new LinkedList<>());
24 testSubject.setCapabilitySources(new LinkedList<>());
25 testSubject.setPath(new LinkedList<>());
26 new CapabilityDataDefinition(testSubject);
30 public void testGetOwnerId() throws Exception {
31 CapabilityDataDefinition testSubject;
35 testSubject = createTestSubject();
36 result = testSubject.getOwnerId();
41 public void testSetOwnerId() throws Exception {
42 CapabilityDataDefinition testSubject;
46 testSubject = createTestSubject();
47 testSubject.setOwnerId(ownerId);
52 public void testGetOwnerName() throws Exception {
53 CapabilityDataDefinition testSubject;
57 testSubject = createTestSubject();
58 result = testSubject.getOwnerName();
63 public void testSetOwnerName() throws Exception {
64 CapabilityDataDefinition testSubject;
65 String ownerName = "";
68 testSubject = createTestSubject();
69 testSubject.setOwnerName(ownerName);
74 public void testGetMinOccurrences() throws Exception {
75 CapabilityDataDefinition testSubject;
79 testSubject = createTestSubject();
80 result = testSubject.getMinOccurrences();
85 public void testSetMinOccurrences() throws Exception {
86 CapabilityDataDefinition testSubject;
87 String minOccurrences = "";
90 testSubject = createTestSubject();
91 testSubject.setMinOccurrences(minOccurrences);
96 public void testGetMaxOccurrences() throws Exception {
97 CapabilityDataDefinition testSubject;
101 testSubject = createTestSubject();
102 result = testSubject.getMaxOccurrences();
107 public void testSetMaxOccurrences() throws Exception {
108 CapabilityDataDefinition testSubject;
109 String maxOccurrences = "";
112 testSubject = createTestSubject();
113 testSubject.setMaxOccurrences(maxOccurrences);
118 public void testGetLeftOccurrences() throws Exception {
119 CapabilityDataDefinition testSubject;
123 testSubject = createTestSubject();
124 result = testSubject.getLeftOccurrences();
129 public void testSetLeftOccurrences() throws Exception {
130 CapabilityDataDefinition testSubject;
131 String leftOccurrences = "";
134 testSubject = createTestSubject();
135 testSubject.setLeftOccurrences(leftOccurrences);
140 public void testGetUniqueId() throws Exception {
141 CapabilityDataDefinition testSubject;
145 testSubject = createTestSubject();
146 result = testSubject.getUniqueId();
151 public void testSetUniqueId() throws Exception {
152 CapabilityDataDefinition testSubject;
153 String uniqueId = "";
156 testSubject = createTestSubject();
157 testSubject.setUniqueId(uniqueId);
162 public void testGetDescription() throws Exception {
163 CapabilityDataDefinition testSubject;
167 testSubject = createTestSubject();
168 result = testSubject.getDescription();
173 public void testSetDescription() throws Exception {
174 CapabilityDataDefinition testSubject;
175 String description = "";
178 testSubject = createTestSubject();
179 testSubject.setDescription(description);
184 public void testGetName() throws Exception {
185 CapabilityDataDefinition testSubject;
189 testSubject = createTestSubject();
190 result = testSubject.getName();
195 public void testSetName() throws Exception {
196 CapabilityDataDefinition testSubject;
200 testSubject = createTestSubject();
201 testSubject.setName(name);
206 public void testGetParentName() throws Exception {
207 CapabilityDataDefinition testSubject;
211 testSubject = createTestSubject();
212 result = testSubject.getParentName();
217 public void testSetParentName() throws Exception {
218 CapabilityDataDefinition testSubject;
219 String parentName = "";
222 testSubject = createTestSubject();
223 testSubject.setParentName(parentName);
228 public void testGetType() throws Exception {
229 CapabilityDataDefinition testSubject;
233 testSubject = createTestSubject();
234 result = testSubject.getType();
239 public void testSetType() throws Exception {
240 CapabilityDataDefinition testSubject;
244 testSubject = createTestSubject();
245 testSubject.setType(type);
250 public void testGetValidSourceTypes() throws Exception {
251 CapabilityDataDefinition testSubject;
255 testSubject = createTestSubject();
256 result = testSubject.getValidSourceTypes();
261 public void testSetValidSourceTypes() throws Exception {
262 CapabilityDataDefinition testSubject;
263 List<String> validSourceTypes = null;
266 testSubject = createTestSubject();
267 testSubject.setValidSourceTypes(validSourceTypes);
272 public void testGetCapabilitySources() throws Exception {
273 CapabilityDataDefinition testSubject;
277 testSubject = createTestSubject();
278 result = testSubject.getCapabilitySources();
283 public void testSetCapabilitySources() throws Exception {
284 CapabilityDataDefinition testSubject;
285 List<String> capabilitySources = null;
288 testSubject = createTestSubject();
289 testSubject.setCapabilitySources(capabilitySources);
294 public void testSetPath() throws Exception {
295 CapabilityDataDefinition testSubject;
296 List<String> path = null;
299 testSubject = createTestSubject();
300 testSubject.setPath(path);
305 public void testGetPath() throws Exception {
306 CapabilityDataDefinition testSubject;
310 testSubject = createTestSubject();
311 result = testSubject.getPath();
316 public void testSetSource() throws Exception {
317 CapabilityDataDefinition testSubject;
321 testSubject = createTestSubject();
322 testSubject.setSource(source);
327 public void testGetSource() throws Exception {
328 CapabilityDataDefinition testSubject;
332 testSubject = createTestSubject();
333 result = testSubject.getSource();
338 public void testAddToPath() throws Exception {
339 CapabilityDataDefinition testSubject;
340 String elementInPath = "";
343 testSubject = createTestSubject();
344 testSubject.addToPath(elementInPath);
349 public void testHashCode() throws Exception {
350 CapabilityDataDefinition testSubject;
354 testSubject = createTestSubject();
355 result = testSubject.hashCode();
360 public void testEquals() throws Exception {
361 CapabilityDataDefinition testSubject;
366 testSubject = createTestSubject();
368 result = testSubject.equals(obj);
369 Assert.assertEquals(false, result);
370 result = testSubject.equals(testSubject);
371 Assert.assertEquals(true, result);
372 result = testSubject.equals(createTestSubject());
373 Assert.assertEquals(true, result);
378 public void testToString() throws Exception {
379 CapabilityDataDefinition testSubject;
383 testSubject = createTestSubject();
384 result = testSubject.toString();