Added oparent to sdc main
[sdc.git] / catalog-model / src / test / java / org / openecomp / sdc / be / model / ServiceTest.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.ForwardingPathDataDefinition;
25
26 import java.util.Map;
27
28 public class ServiceTest {
29
30         private Service createTestSubject() {
31                 return new Service();
32         }
33         
34         @Test
35         public void testCtor() throws Exception {
36                 new Service(new ComponentMetadataDefinition());
37         }
38         
39         @Test
40         public void testGetServiceApiArtifacts() throws Exception {
41                 Service testSubject;
42                 Map<String, ArtifactDefinition> result;
43
44                 // default test
45                 testSubject = createTestSubject();
46                 result = testSubject.getServiceApiArtifacts();
47         }
48
49         
50         @Test
51         public void testSetServiceApiArtifacts() throws Exception {
52                 Service testSubject;
53                 Map<String, ArtifactDefinition> serviceApiArtifacts = null;
54
55                 // default test
56                 testSubject = createTestSubject();
57                 testSubject.setServiceApiArtifacts(serviceApiArtifacts);
58         }
59
60         
61         @Test
62         public void testGetProjectCode() throws Exception {
63                 Service testSubject;
64                 String result;
65
66                 // default test
67                 testSubject = createTestSubject();
68                 result = testSubject.getProjectCode();
69         }
70
71         
72         @Test
73         public void testGetForwardingPaths() throws Exception {
74                 Service testSubject;
75                 Map<String, ForwardingPathDataDefinition> result;
76
77                 // default test
78                 testSubject = createTestSubject();
79                 result = testSubject.getForwardingPaths();
80         }
81
82         
83         @Test
84         public void testSetForwardingPaths() throws Exception {
85                 Service testSubject;
86                 Map<String, ForwardingPathDataDefinition> forwardingPaths = null;
87
88                 // default test
89                 testSubject = createTestSubject();
90                 testSubject.setForwardingPaths(forwardingPaths);
91         }
92
93         
94         @Test
95         public void testAddForwardingPath() throws Exception {
96                 Service testSubject;
97                 ForwardingPathDataDefinition forwardingPathDataDefinition = new ForwardingPathDataDefinition();
98                 ForwardingPathDataDefinition result;
99
100                 // default test
101                 testSubject = createTestSubject();
102                 result = testSubject.addForwardingPath(forwardingPathDataDefinition);
103         }
104
105         
106         @Test
107         public void testSetProjectCode() throws Exception {
108                 Service testSubject;
109                 String projectName = "";
110
111                 // default test
112                 testSubject = createTestSubject();
113                 testSubject.setProjectCode(projectName);
114         }
115
116         
117         @Test
118         public void testGetDistributionStatus() throws Exception {
119                 Service testSubject;
120                 DistributionStatusEnum result;
121
122                 // default test
123                 testSubject = createTestSubject();
124                 result = testSubject.getDistributionStatus();
125         }
126
127         
128         @Test
129         public void testSetDistributionStatus() throws Exception {
130                 Service testSubject;
131                 DistributionStatusEnum distributionStatus = null;
132
133                 // test 1
134                 testSubject = createTestSubject();
135                 distributionStatus = null;
136                 testSubject.setDistributionStatus(distributionStatus);
137                 testSubject.setDistributionStatus(DistributionStatusEnum.DISTRIBUTED);
138         }
139
140         
141         @Test
142         public void testSetEcompGeneratedNaming() throws Exception {
143                 Service testSubject;
144                 Boolean ecompGeneratedNaming = null;
145
146                 // default test
147                 testSubject = createTestSubject();
148                 testSubject.setEcompGeneratedNaming(ecompGeneratedNaming);
149         }
150
151         
152         @Test
153         public void testIsEcompGeneratedNaming() throws Exception {
154                 Service testSubject;
155                 Boolean result;
156
157                 // default test
158                 testSubject = createTestSubject();
159                 result = testSubject.isEcompGeneratedNaming();
160         }
161
162         
163         @Test
164         public void testSetNamingPolicy() throws Exception {
165                 Service testSubject;
166                 String namingPolicy = "";
167
168                 // default test
169                 testSubject = createTestSubject();
170                 testSubject.setNamingPolicy(namingPolicy);
171         }
172
173         
174         @Test
175         public void testGetNamingPolicy() throws Exception {
176                 Service testSubject;
177                 String result;
178
179                 // default test
180                 testSubject = createTestSubject();
181                 result = testSubject.getNamingPolicy();
182         }
183
184         
185         @Test
186         public void testGetEnvironmentContext() throws Exception {
187                 Service testSubject;
188                 String result;
189
190                 // default test
191                 testSubject = createTestSubject();
192                 result = testSubject.getEnvironmentContext();
193         }
194
195         
196         @Test
197         public void testSetEnvironmentContext() throws Exception {
198                 Service testSubject;
199                 String environmentContext = "";
200
201                 // default test
202                 testSubject = createTestSubject();
203                 testSubject.setEnvironmentContext(environmentContext);
204         }
205
206         
207         @Test
208         public void testSetServiceType() throws Exception {
209                 Service testSubject;
210                 String serviceType = "";
211
212                 // default test
213                 testSubject = createTestSubject();
214                 testSubject.setServiceType(serviceType);
215         }
216
217         
218         @Test
219         public void testGetServiceType() throws Exception {
220                 Service testSubject;
221                 String result;
222
223                 // default test
224                 testSubject = createTestSubject();
225                 result = testSubject.getServiceType();
226         }
227
228         
229         @Test
230         public void testSetServiceRole() throws Exception {
231                 Service testSubject;
232                 String serviceRole = "";
233
234                 // default test
235                 testSubject = createTestSubject();
236                 testSubject.setServiceRole(serviceRole);
237         }
238
239         
240         @Test
241         public void testGetServiceRole() throws Exception {
242                 Service testSubject;
243                 String result;
244
245                 // default test
246                 testSubject = createTestSubject();
247                 result = testSubject.getServiceRole();
248         }
249
250         
251
252
253         
254         @Test
255         public void testToString() throws Exception {
256                 Service testSubject;
257                 String result;
258
259                 // default test
260                 testSubject = createTestSubject();
261                 result = testSubject.toString();
262         }
263
264         
265         @Test
266         public void testSetSpecificComponetTypeArtifacts() throws Exception {
267                 Service testSubject;
268                 Map<String, ArtifactDefinition> specificComponentTypeArtifacts = null;
269
270                 // default test
271                 testSubject = createTestSubject();
272                 testSubject.setSpecificComponetTypeArtifacts(specificComponentTypeArtifacts);
273         }
274 }