Added oparent to sdc main
[sdc.git] / catalog-be / src / test / java / org / openecomp / sdc / be / servlets / ResourcesServletTest.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 java.util.List;
24 import java.util.Map;
25
26 import javax.servlet.http.HttpServletRequest;
27 import javax.ws.rs.core.Response;
28
29 import org.junit.Test;
30 import org.openecomp.sdc.be.model.PropertyDefinition;
31 import org.openecomp.sdc.be.model.Resource;
32 import org.openecomp.sdc.be.model.User;
33 import org.openecomp.sdc.exception.ResponseFormat;
34
35 import com.google.common.base.Equivalence.Wrapper;
36
37 import fj.data.Either;
38
39 public class ResourcesServletTest {
40
41         private ResourcesServlet createTestSubject() {
42                 return new ResourcesServlet();
43         }
44
45         
46         @Test
47         public void testCreateResource() throws Exception {
48                 ResourcesServlet testSubject;
49                 String data = "";
50                 HttpServletRequest request = null;
51                 String userId = "";
52                 Response result;
53
54                 // default test
55                 testSubject = createTestSubject();
56                 
57         }
58
59         
60         @Test
61         public void testIsUIImport() throws Exception {
62                 ResourcesServlet testSubject;
63                 String data = "";
64                 boolean result;
65
66                 // default test
67                 testSubject = createTestSubject();
68         }
69
70         
71         @Test
72         public void testPerformUIImport() throws Exception {
73         ResourcesServlet testSubject;Wrapper<Response> responseWrapper = null;
74         String data = "";
75         HttpServletRequest request = null;
76         String userId = "";
77         String resourceUniqueId = "";
78         
79         
80         // default test
81         }
82
83         
84         @Test
85         public void testParseToResource() throws Exception {
86                 ResourcesServlet testSubject;
87                 String resourceJson = "";
88                 User user = null;
89                 Either<Resource, ResponseFormat> result;
90
91                 // default test
92                 testSubject = createTestSubject();
93                 
94         }
95
96         
97         @Test
98         public void testParseToLightResource() throws Exception {
99                 ResourcesServlet testSubject;
100                 String resourceJson = "";
101                 User user = null;
102                 Either<Resource, ResponseFormat> result;
103
104                 // default test
105                 testSubject = createTestSubject();
106                 
107         }
108
109         
110         @Test
111         public void testDeleteResource() throws Exception {
112                 ResourcesServlet testSubject;
113                 String resourceId = "";
114                 HttpServletRequest request = null;
115                 Response result;
116
117                 // default test
118                 testSubject = createTestSubject();
119                 
120         }
121
122         
123         @Test
124         public void testDeleteResourceByNameAndVersion() throws Exception {
125                 ResourcesServlet testSubject;
126                 String resourceName = "";
127                 String version = "";
128                 HttpServletRequest request = null;
129                 Response result;
130
131                 // default test
132                 testSubject = createTestSubject();
133                 
134         }
135
136         
137         @Test
138         public void testGetResourceById() throws Exception {
139                 ResourcesServlet testSubject;
140                 String resourceId = "";
141                 HttpServletRequest request = null;
142                 String userId = "";
143                 Response result;
144
145                 // default test
146                 testSubject = createTestSubject();
147                 
148         }
149
150         
151         @Test
152         public void testGetResourceByNameAndVersion() throws Exception {
153                 ResourcesServlet testSubject;
154                 String resourceName = "";
155                 String resourceVersion = "";
156                 HttpServletRequest request = null;
157                 String userId = "";
158                 Response result;
159
160                 // default test
161                 testSubject = createTestSubject();
162                 
163         }
164
165         
166         @Test
167         public void testValidateResourceName() throws Exception {
168                 ResourcesServlet testSubject;
169                 String resourceName = "";
170                 String resourceType = "";
171                 HttpServletRequest request = null;
172                 String userId = "";
173                 Response result;
174
175                 // default test
176                 testSubject = createTestSubject();
177                 
178         }
179
180         
181         @Test
182         public void testGetCertifiedAbstractResources() throws Exception {
183                 ResourcesServlet testSubject;
184                 HttpServletRequest request = null;
185                 String userId = "";
186                 Response result;
187
188                 // default test
189                 testSubject = createTestSubject();
190                 
191         }
192
193         
194         @Test
195         public void testGetCertifiedNotAbstractResources() throws Exception {
196                 ResourcesServlet testSubject;
197                 HttpServletRequest request = null;
198                 String userId = "";
199                 Response result;
200
201                 // default test
202                 testSubject = createTestSubject();
203                 
204         }
205
206         
207         @Test
208         public void testUpdateResourceMetadata() throws Exception {
209                 ResourcesServlet testSubject;
210                 String resourceId = "";
211                 String data = "";
212                 HttpServletRequest request = null;
213                 String userId = "";
214                 Response result;
215
216                 // default test
217                 testSubject = createTestSubject();
218                 
219         }
220
221         
222         @Test
223         public void testUpdateResource() throws Exception {
224                 ResourcesServlet testSubject;
225                 String data = "";
226                 HttpServletRequest request = null;
227                 String userId = "";
228                 String resourceId = "";
229                 Response result;
230
231                 // default test
232                 testSubject = createTestSubject();
233                 
234         }
235
236         
237         @Test
238         public void testConvertMapToList() throws Exception {
239                 Map<String, PropertyDefinition> properties = null;
240                 List<PropertyDefinition> result;
241
242                 // test 1
243                 properties = null;
244                 
245         }
246
247         
248         @Test
249         public void testGetResourceFromCsar() throws Exception {
250                 ResourcesServlet testSubject;
251                 HttpServletRequest request = null;
252                 String userId = "";
253                 String csarUUID = "";
254                 Response result;
255
256                 // default test
257                 testSubject = createTestSubject();
258                 
259         }
260 }