1 package org.openecomp.sdc.be.model;
4 import org.openecomp.sdc.be.datatypes.elements.CapabilityDataDefinition;
6 import java.util.LinkedList;
10 public class CapabilityDefinitionTest {
12 private CapabilityDefinition createTestSubject() {
13 return new CapabilityDefinition();
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());
26 public void testHashCode() throws Exception {
27 CapabilityDefinition testSubject;
31 testSubject = createTestSubject();
32 result = testSubject.hashCode();
37 public void testEquals() throws Exception {
38 CapabilityDefinition testSubject;
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);
57 public void testToString() throws Exception {
58 CapabilityDefinition testSubject;
62 testSubject = createTestSubject();
63 result = testSubject.toString();
68 public void testGetProperties() throws Exception {
69 CapabilityDefinition testSubject;
70 List<ComponentInstanceProperty> result;
73 testSubject = createTestSubject();
74 result = testSubject.getProperties();
79 public void testSetProperties() throws Exception {
80 CapabilityDefinition testSubject;
81 List<ComponentInstanceProperty> properties = null;
84 testSubject = createTestSubject();
85 testSubject.setProperties(properties);