Added oparent to sdc main
[sdc.git] / catalog-model / src / test / java / org / openecomp / sdc / be / model / CapabilityDefinitionTest.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.CapabilityDataDefinition;
25
26 import java.util.LinkedList;
27 import java.util.List;
28
29
30 public class CapabilityDefinitionTest {
31
32         private CapabilityDefinition createTestSubject() {
33                 return new CapabilityDefinition();
34         }
35
36         @Test
37         public void testCtor() throws Exception {
38                 CapabilityDefinition other = new CapabilityDefinition();
39                 new CapabilityDefinition(other);
40                 other.setProperties(new LinkedList<>());
41                 new CapabilityDefinition(other);
42                 new CapabilityDefinition(new CapabilityDataDefinition());
43         }
44         
45         @Test
46         public void testHashCode() throws Exception {
47                 CapabilityDefinition testSubject;
48                 int result;
49
50                 // default test
51                 testSubject = createTestSubject();
52                 result = testSubject.hashCode();
53         }
54
55         
56         @Test
57         public void testEquals() throws Exception {
58                 CapabilityDefinition testSubject;
59                 Object obj = null;
60                 boolean result;
61
62                 // default test
63                 testSubject = createTestSubject();
64                 result = testSubject.equals(obj);
65                 result = testSubject.equals(new Object());
66                 result = testSubject.equals(testSubject);
67                 CapabilityDefinition createTestSubject = createTestSubject();
68                 result = testSubject.equals(createTestSubject);
69                 createTestSubject.setProperties(new LinkedList<>());
70                 result = testSubject.equals(createTestSubject);
71                 testSubject.setProperties(new LinkedList<>());
72                 result = testSubject.equals(createTestSubject);
73         }
74
75         
76         @Test
77         public void testToString() throws Exception {
78                 CapabilityDefinition testSubject;
79                 String result;
80
81                 // default test
82                 testSubject = createTestSubject();
83                 result = testSubject.toString();
84         }
85
86         
87         @Test
88         public void testGetProperties() throws Exception {
89                 CapabilityDefinition testSubject;
90                 List<ComponentInstanceProperty> result;
91
92                 // default test
93                 testSubject = createTestSubject();
94                 result = testSubject.getProperties();
95         }
96
97         
98         @Test
99         public void testSetProperties() throws Exception {
100                 CapabilityDefinition testSubject;
101                 List<ComponentInstanceProperty> properties = null;
102
103                 // default test
104                 testSubject = createTestSubject();
105                 testSubject.setProperties(properties);
106         }
107 }