Added oparent to sdc main
[sdc.git] / common-be / src / test / java / org / openecomp / sdc / be / datatypes / components / ServiceMetadataDataDefinitionTest.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.datatypes.components;
22
23 import org.junit.Assert;
24 import org.junit.Test;
25 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
26
27
28 public class ServiceMetadataDataDefinitionTest {
29
30         private ServiceMetadataDataDefinition createTestSubject() {
31                 return new ServiceMetadataDataDefinition();
32         }
33
34         @Test
35         public void testCopyConstructor() throws Exception {
36                 ServiceMetadataDataDefinition testSubject;
37
38                 // default test
39                 testSubject = createTestSubject();
40                 ServiceMetadataDataDefinition serviceMetadataDataDefinition = new ServiceMetadataDataDefinition(testSubject);
41         }
42         
43         @Test
44         public void testGetDistributionStatus() throws Exception {
45                 ServiceMetadataDataDefinition testSubject;
46                 String result;
47
48                 // default test
49                 testSubject = createTestSubject();
50                 result = testSubject.getDistributionStatus();
51         }
52
53         
54         @Test
55         public void testSetDistributionStatus() throws Exception {
56                 ServiceMetadataDataDefinition testSubject;
57                 String distributionStatus = "";
58
59                 // default test
60                 testSubject = createTestSubject();
61                 testSubject.setDistributionStatus(distributionStatus);
62         }
63
64         
65         @Test
66         public void testGetServiceType() throws Exception {
67                 ServiceMetadataDataDefinition testSubject;
68                 String result;
69
70                 // default test
71                 testSubject = createTestSubject();
72                 result = testSubject.getServiceType();
73         }
74
75         
76         @Test
77         public void testSetServiceType() throws Exception {
78                 ServiceMetadataDataDefinition testSubject;
79                 String serviceType = "";
80
81                 // default test
82                 testSubject = createTestSubject();
83                 testSubject.setServiceType(serviceType);
84         }
85
86         
87         @Test
88         public void testGetServiceRole() throws Exception {
89                 ServiceMetadataDataDefinition testSubject;
90                 String result;
91
92                 // default test
93                 testSubject = createTestSubject();
94                 result = testSubject.getServiceRole();
95         }
96
97         
98         @Test
99         public void testSetServiceRole() throws Exception {
100                 ServiceMetadataDataDefinition testSubject;
101                 String serviceRole = "";
102
103                 // default test
104                 testSubject = createTestSubject();
105                 testSubject.setServiceRole(serviceRole);
106         }
107
108         
109         @Test
110         public void testIsEcompGeneratedNaming() throws Exception {
111                 ServiceMetadataDataDefinition testSubject;
112                 Boolean result;
113
114                 // default test
115                 testSubject = createTestSubject();
116                 result = testSubject.isEcompGeneratedNaming();
117         }
118
119         
120         @Test
121         public void testSetEcompGeneratedNaming() throws Exception {
122                 ServiceMetadataDataDefinition testSubject;
123                 Boolean ecompGeneratedNaming = null;
124
125                 // default test
126                 testSubject = createTestSubject();
127                 testSubject.setEcompGeneratedNaming(ecompGeneratedNaming);
128         }
129
130         
131         @Test
132         public void testGetNamingPolicy() throws Exception {
133                 ServiceMetadataDataDefinition testSubject;
134                 String result;
135
136                 // default test
137                 testSubject = createTestSubject();
138                 result = testSubject.getNamingPolicy();
139         }
140
141         
142         @Test
143         public void testSetNamingPolicy() throws Exception {
144                 ServiceMetadataDataDefinition testSubject;
145                 String namingPolicy = "";
146
147                 // default test
148                 testSubject = createTestSubject();
149                 testSubject.setNamingPolicy(namingPolicy);
150         }
151
152         
153         @Test
154         public void testToString() throws Exception {
155                 ServiceMetadataDataDefinition testSubject;
156                 String result;
157
158                 // default test
159                 testSubject = createTestSubject();
160                 result = testSubject.toString();
161         }
162
163         
164         @Test
165         public void testHashCode() throws Exception {
166                 ServiceMetadataDataDefinition testSubject;
167                 int result;
168
169                 // default test
170                 testSubject = createTestSubject();
171                 result = testSubject.hashCode();
172         }
173
174         @Test
175         public void testgetActualComponentType() throws Exception {
176                 ServiceMetadataDataDefinition testSubject;
177                 String result;
178
179                 // default test
180                 testSubject = createTestSubject();
181                 result = testSubject.getActualComponentType();
182                 testSubject.setComponentType(ComponentTypeEnum.PRODUCT);
183                 result = testSubject.getActualComponentType();
184         }
185         
186         @Test
187         public void testEquals() throws Exception {
188                 ServiceMetadataDataDefinition testSubject;
189                 Object obj = null;
190                 boolean result;
191
192                 // test 1
193                 testSubject = createTestSubject();
194                 obj = null;
195                 result = testSubject.equals(obj);
196                 Assert.assertEquals(false, result);
197                 result = testSubject.equals(testSubject);
198                 Assert.assertEquals(true, result);
199                 result = testSubject.equals(new ServiceMetadataDataDefinition());
200                 Assert.assertEquals(true, result);
201         }
202 }