re base code
[sdc.git] / catalog-model / src / test / java / org / openecomp / sdc / be / model / CapabilityDefinitionTest.java
1 package org.openecomp.sdc.be.model;
2
3 import org.junit.Test;
4 import org.openecomp.sdc.be.datatypes.elements.CapabilityDataDefinition;
5
6 import java.util.LinkedList;
7 import java.util.List;
8
9
10 public class CapabilityDefinitionTest {
11
12         private CapabilityDefinition createTestSubject() {
13                 return new CapabilityDefinition();
14         }
15
16         @Test
17         public void testCtor() throws Exception {
18                 CapabilityDefinition other = new CapabilityDefinition();
19                 new CapabilityDefinition(other);
20                 other.setProperties(new LinkedList<>());
21                 new CapabilityDefinition(other);
22                 new CapabilityDefinition(new CapabilityDataDefinition());
23         }
24         
25         @Test
26         public void testHashCode() throws Exception {
27                 CapabilityDefinition testSubject;
28                 int result;
29
30                 // default test
31                 testSubject = createTestSubject();
32                 result = testSubject.hashCode();
33         }
34
35         
36         @Test
37         public void testEquals() throws Exception {
38                 CapabilityDefinition testSubject;
39                 Object obj = null;
40                 boolean result;
41
42                 // default test
43                 testSubject = createTestSubject();
44                 result = testSubject.equals(obj);
45                 result = testSubject.equals(new Object());
46                 result = testSubject.equals(testSubject);
47                 CapabilityDefinition createTestSubject = createTestSubject();
48                 result = testSubject.equals(createTestSubject);
49                 createTestSubject.setProperties(new LinkedList<>());
50                 result = testSubject.equals(createTestSubject);
51                 testSubject.setProperties(new LinkedList<>());
52                 result = testSubject.equals(createTestSubject);
53         }
54
55         
56         @Test
57         public void testToString() throws Exception {
58                 CapabilityDefinition testSubject;
59                 String result;
60
61                 // default test
62                 testSubject = createTestSubject();
63                 result = testSubject.toString();
64         }
65
66         
67         @Test
68         public void testGetProperties() throws Exception {
69                 CapabilityDefinition testSubject;
70                 List<ComponentInstanceProperty> result;
71
72                 // default test
73                 testSubject = createTestSubject();
74                 result = testSubject.getProperties();
75         }
76
77         
78         @Test
79         public void testSetProperties() throws Exception {
80                 CapabilityDefinition testSubject;
81                 List<ComponentInstanceProperty> properties = null;
82
83                 // default test
84                 testSubject = createTestSubject();
85                 testSubject.setProperties(properties);
86         }
87 }