catalog-be servlets refactoring
[sdc.git] / catalog-be / src / test / java / org / openecomp / sdc / be / servlets / ArtifactServletTest.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 static org.mockito.Mockito.mock;
24
25 import javax.servlet.http.HttpServletRequest;
26 import javax.ws.rs.core.Response;
27
28 import org.junit.Test;
29 import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic;
30 import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic;
31 import org.openecomp.sdc.be.components.impl.ConsumerBusinessLogic;
32 import org.openecomp.sdc.be.components.impl.GroupBusinessLogic;
33 import org.openecomp.sdc.be.impl.ComponentsUtils;
34 import org.openecomp.sdc.be.user.UserBusinessLogic;
35
36
37 public class ArtifactServletTest {
38
39         private ArtifactServlet createTestSubject() {
40                 UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
41                 ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
42                 ArtifactsBusinessLogic artifactsBusinessLogic = mock(ArtifactsBusinessLogic.class);
43                 return new ArtifactServlet(userBusinessLogic, componentsUtils,artifactsBusinessLogic);
44         }
45
46         
47         @Test
48         public void testLoadArtifact() throws Exception {
49                 ArtifactServlet testSubject;
50                 String resourceId = "";
51                 String data = "";
52                 HttpServletRequest request = null;
53                 Response result;
54
55                 // default test
56                 testSubject = createTestSubject();
57                 
58         }
59
60         
61         @Test
62         public void testUpdateArtifact() throws Exception {
63                 ArtifactServlet testSubject;
64                 String resourceId = "";
65                 String artifactId = "";
66                 String data = "";
67                 HttpServletRequest request = null;
68                 Response result;
69
70                 // default test
71                 testSubject = createTestSubject();
72                 
73         }
74
75         
76         @Test
77         public void testDeleteArtifact() throws Exception {
78                 ArtifactServlet testSubject;
79                 String resourceId = "";
80                 String artifactId = "";
81                 HttpServletRequest request = null;
82                 Response result;
83
84                 // default test
85                 testSubject = createTestSubject();
86                 
87         }
88
89         
90         @Test
91         public void testLoadInformationArtifact() throws Exception {
92                 ArtifactServlet testSubject;
93                 String serviceId = "";
94                 String data = "";
95                 HttpServletRequest request = null;
96                 Response result;
97
98                 // default test
99                 testSubject = createTestSubject();
100                 
101         }
102
103         
104         @Test
105         public void testUpdateInformationArtifact() throws Exception {
106                 ArtifactServlet testSubject;
107                 String serviceId = "";
108                 String artifactId = "";
109                 String data = "";
110                 HttpServletRequest request = null;
111                 Response result;
112
113                 // default test
114                 testSubject = createTestSubject();
115                 
116         }
117
118         
119         @Test
120         public void testUpdateApiArtifact() throws Exception {
121                 ArtifactServlet testSubject;
122                 String serviceId = "";
123                 String artifactId = "";
124                 String data = "";
125                 HttpServletRequest request = null;
126                 String userId = "";
127                 String origMd5 = "";
128                 Response result;
129
130                 // default test
131                 testSubject = createTestSubject();
132                 
133         }
134
135         
136         @Test
137         public void testDeleteApiArtifact() throws Exception {
138                 ArtifactServlet testSubject;
139                 String serviceId = "";
140                 String artifactId = "";
141                 HttpServletRequest request = null;
142                 String userId = "";
143                 String origMd5 = "";
144                 Response result;
145
146                 // default test
147                 testSubject = createTestSubject();
148                 
149         }
150
151         
152         @Test
153         public void testDeleteInformationalArtifact() throws Exception {
154                 ArtifactServlet testSubject;
155                 String serviceId = "";
156                 String artifactId = "";
157                 HttpServletRequest request = null;
158                 Response result;
159
160                 // default test
161                 testSubject = createTestSubject();
162                 
163         }
164
165         
166         @Test
167         public void testDownloadServiceArtifactBase64() throws Exception {
168                 ArtifactServlet testSubject;
169                 String serviceId = "";
170                 String artifactId = "";
171                 HttpServletRequest request = null;
172                 Response result;
173
174                 // default test
175                 testSubject = createTestSubject();
176                 
177         }
178
179         
180         @Test
181         public void testDownloadResourceArtifactBase64() throws Exception {
182                 ArtifactServlet testSubject;
183                 String resourceId = "";
184                 String artifactId = "";
185                 HttpServletRequest request = null;
186                 Response result;
187
188                 // default test
189                 testSubject = createTestSubject();
190                 
191         }
192
193         
194         @Test
195         public void testDownloadResourceInstanceArtifactBase64() throws Exception {
196                 ArtifactServlet testSubject;
197                 String containerComponentType = "";
198                 String componentId = "";
199                 String componentInstanceId = "";
200                 String artifactId = "";
201                 HttpServletRequest request = null;
202                 Response result;
203
204                 // default test
205                 testSubject = createTestSubject();
206                 
207         }
208
209         
210         @Test
211         public void testLoadArtifactToInterface() throws Exception {
212                 ArtifactServlet testSubject;
213                 String resourceId = "";
214                 String interfaceType = "";
215                 String operation = "";
216                 String userId = "";
217                 String origMd5 = "";
218                 String data = "";
219                 HttpServletRequest request = null;
220                 Response result;
221
222                 // default test
223                 testSubject = createTestSubject();
224                 
225         }
226
227         
228         @Test
229         public void testDeleteArtifactToInterface() throws Exception {
230                 ArtifactServlet testSubject;
231                 String resourceId = "";
232                 String interfaceType = "";
233                 String operation = "";
234                 String artifactId = "";
235                 HttpServletRequest request = null;
236                 Response result;
237
238                 // default test
239                 testSubject = createTestSubject();
240                 
241         }
242
243         
244         @Test
245         public void testUpdateArtifactToInterface() throws Exception {
246                 ArtifactServlet testSubject;
247                 String resourceId = "";
248                 String interfaceType = "";
249                 String operation = "";
250                 String artifactId = "";
251                 String userId = "";
252                 String origMd5 = "";
253                 HttpServletRequest request = null;
254                 String data = "";
255                 Response result;
256
257                 // default test
258                 testSubject = createTestSubject();
259                 
260         }
261
262         
263         @Test
264         public void testUpdateRIArtifact() throws Exception {
265                 ArtifactServlet testSubject;
266                 String containerComponentType = "";
267                 String componentId = "";
268                 String componentInstanceId = "";
269                 String artifactId = "";
270                 String data = "";
271                 HttpServletRequest request = null;
272                 Response result;
273
274                 // default test
275                 testSubject = createTestSubject();
276                 
277         }
278
279         
280         @Test
281         public void testUpdateComponentInstanceArtifact() throws Exception {
282                 ArtifactServlet testSubject;
283                 String userId = "";
284                 String origMd5 = "";
285                 String containerComponentType = "";
286                 String componentId = "";
287                 String componentInstanceId = "";
288                 String artifactId = "";
289                 String data = "";
290                 HttpServletRequest request = null;
291                 Response result;
292
293                 // default test
294                 testSubject = createTestSubject();
295                 
296         }
297
298         
299         @Test
300         public void testLoadComponentInstanceArtifact() throws Exception {
301                 ArtifactServlet testSubject;
302                 String userId = "";
303                 String origMd5 = "";
304                 String containerComponentType = "";
305                 String componentId = "";
306                 String componentInstanceId = "";
307                 String data = "";
308                 HttpServletRequest request = null;
309                 Response result;
310
311                 // default test
312                 testSubject = createTestSubject();
313                 
314         }
315
316         
317         @Test
318         public void testDeleteComponentInstanceArtifact() throws Exception {
319                 ArtifactServlet testSubject;
320                 String userId = "";
321                 String origMd5 = "";
322                 String containerComponentType = "";
323                 String componentId = "";
324                 String componentInstanceId = "";
325                 String artifactId = "";
326                 String data = "";
327                 HttpServletRequest request = null;
328                 Response result;
329
330                 // default test
331                 testSubject = createTestSubject();
332                 
333         }
334
335         
336         @Test
337         public void testGetComponentArtifacts() throws Exception {
338                 ArtifactServlet testSubject;
339                 String containerComponentType = "";
340                 String componentId = "";
341                 String artifactGroupType = "";
342                 HttpServletRequest request = null;
343                 Response result;
344
345                 // default test
346                 testSubject = createTestSubject();
347                 
348         }
349
350         
351         @Test
352         public void testGetComponentInstanceArtifacts() throws Exception {
353                 ArtifactServlet testSubject;
354                 String containerComponentType = "";
355                 String componentId = "";
356                 String componentInstanceId = "";
357                 String artifactGroupType = "";
358                 HttpServletRequest request = null;
359                 Response result;
360
361                 // default test
362                 testSubject = createTestSubject();
363                 
364         }
365
366         
367
368 }