Added oparent to sdc main
[sdc.git] / catalog-be / src / test / java / org / openecomp / sdc / be / servlets / ServiceServletTest.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.servlets;
22
23 import javax.servlet.ServletContext;
24 import javax.servlet.http.HttpServletRequest;
25 import javax.ws.rs.core.Response;
26
27 import org.junit.Test;
28 import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction;
29 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
30 import org.openecomp.sdc.be.model.User;
31 import org.openecomp.sdc.exception.ResponseFormat;
32
33 import com.google.common.base.Equivalence.Wrapper;
34 import com.google.common.util.concurrent.Service;
35
36 import fj.data.Either;
37
38 public class ServiceServletTest {
39
40         private ServiceServlet createTestSubject() {
41                 return new ServiceServlet();
42         }
43
44         
45         @Test
46         public void testCreateService() throws Exception {
47                 ServiceServlet testSubject;
48                 String data = "";
49                 HttpServletRequest request = null;
50                 String userId = "";
51                 Response result;
52
53                 // default test
54                 testSubject = createTestSubject();
55                 
56         }
57
58         
59         @Test
60         public void testParseToService() throws Exception {
61                 ServiceServlet testSubject;
62                 String serviceJson = "";
63                 User user = null;
64                 Either<Service, ResponseFormat> result;
65
66                 // default test
67                 testSubject = createTestSubject();
68         }
69
70         
71         @Test
72         public void testValidateServiceName() throws Exception {
73                 ServiceServlet testSubject;
74                 String serviceName = "";
75                 HttpServletRequest request = null;
76                 String userId = "";
77                 Response result;
78
79                 // default test
80                 testSubject = createTestSubject();
81                 
82         }
83
84         
85         @Test
86         public void testGetComponentAuditRecords() throws Exception {
87                 ServiceServlet testSubject;
88                 String componentType = "";
89                 String componentUniqueId = "";
90                 HttpServletRequest request = null;
91                 String userId = "";
92                 Response result;
93
94                 // default test
95                 testSubject = createTestSubject();
96                 
97         }
98
99         
100         @Test
101         public void testFillUUIDAndVersion() throws Exception {
102         ServiceServlet testSubject;Wrapper<Response> responseWrapper = null;
103         Wrapper<String> uuidWrapper = null;
104         Wrapper<String> versionWrapper = null;
105         User user = null;
106         ComponentTypeEnum componentTypeEnum = null;
107         String componentUniqueId = "";
108         ServletContext context = null;
109         
110         
111         // default test
112         }
113
114         
115         @Test
116         public void testDeleteService() throws Exception {
117                 ServiceServlet testSubject;
118                 String serviceId = "";
119                 HttpServletRequest request = null;
120                 Response result;
121
122                 // default test
123                 testSubject = createTestSubject();
124                 
125         }
126
127         
128         @Test
129         public void testDeleteServiceByNameAndVersion() throws Exception {
130                 ServiceServlet testSubject;
131                 String serviceName = "";
132                 String version = "";
133                 HttpServletRequest request = null;
134                 Response result;
135
136                 // default test
137                 testSubject = createTestSubject();
138                 
139         }
140
141         
142         @Test
143         public void testUpdateServiceMetadata() throws Exception {
144                 ServiceServlet testSubject;
145                 String serviceId = "";
146                 String data = "";
147                 HttpServletRequest request = null;
148                 String userId = "";
149                 Response result;
150
151                 // default test
152                 testSubject = createTestSubject();
153                 
154         }
155
156         
157         @Test
158         public void testUpdateGroupInstancePropertyValues() throws Exception {
159                 ServiceServlet testSubject;
160                 String serviceId = "";
161                 String componentInstanceId = "";
162                 String groupInstanceId = "";
163                 String data = "";
164                 HttpServletRequest request = null;
165                 String userId = "";
166                 Response result;
167
168                 // default test
169                 testSubject = createTestSubject();
170                 
171         }
172
173         
174         @Test
175         public void testGetServiceById() throws Exception {
176                 ServiceServlet testSubject;
177                 String serviceId = "";
178                 HttpServletRequest request = null;
179                 String userId = "";
180                 Response result;
181
182                 // default test
183                 testSubject = createTestSubject();
184                 
185         }
186
187         
188         @Test
189         public void testGetServiceByNameAndVersion() throws Exception {
190                 ServiceServlet testSubject;
191                 String serviceName = "";
192                 String serviceVersion = "";
193                 HttpServletRequest request = null;
194                 String userId = "";
195                 Response result;
196
197                 // default test
198                 testSubject = createTestSubject();
199                 
200         }
201
202         
203         @Test
204         public void testUpdateServiceDistributionState() throws Exception {
205                 ServiceServlet testSubject;
206                 LifecycleChangeInfoWithAction jsonChangeInfo = null;
207                 String serviceId = "";
208                 String state = "";
209                 HttpServletRequest request = null;
210                 String userId = "";
211                 Response result;
212
213                 // default test
214                 testSubject = createTestSubject();
215                 
216         }
217
218         
219         @Test
220         public void testActivateDistribution() throws Exception {
221                 ServiceServlet testSubject;
222                 String serviceId = "";
223                 String env = "";
224                 HttpServletRequest request = null;
225                 String userId = "";
226                 Response result;
227
228                 // default test
229                 testSubject = createTestSubject();
230                 
231         }
232
233         
234         @Test
235         public void testMarkDistributionAsDeployed() throws Exception {
236                 ServiceServlet testSubject;
237                 String serviceId = "";
238                 String did = "";
239                 HttpServletRequest request = null;
240                 String userId = "";
241                 Response result;
242
243                 // default test
244                 testSubject = createTestSubject();
245                 
246         }
247
248         
249         @Test
250         public void testTempUrlToBeDeleted() throws Exception {
251                 ServiceServlet testSubject;
252                 String serviceId = "";
253                 HttpServletRequest request = null;
254                 String userId = "";
255                 Response result;
256
257                 // default test
258                 testSubject = createTestSubject();
259                 
260         }
261
262         
263         @Test
264         public void testDownloadServiceArtifact() throws Exception {
265                 ServiceServlet testSubject;
266                 String artifactName = "";
267                 HttpServletRequest request = null;
268                 Response result;
269
270                 // default test
271                 testSubject = createTestSubject();
272                 
273         }
274
275         
276         @Test
277         public void testExecuteCommand() throws Exception {
278                 ServiceServlet testSubject;
279                 String artifactName = "";
280                 Either<byte[], ResponseFormat> result;
281
282                 // default test
283                 testSubject = createTestSubject();
284         }
285 }