catalog-be servlets refactoring
[sdc.git] / catalog-be / src / test / java / org / openecomp / sdc / be / servlets / ProductServletTest.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.ComponentInstanceBusinessLogic;
30 import org.openecomp.sdc.be.components.impl.GroupBusinessLogic;
31 import org.openecomp.sdc.be.components.impl.ProductBusinessLogic;
32 import org.openecomp.sdc.be.impl.ComponentsUtils;
33 import org.openecomp.sdc.be.user.UserBusinessLogic;
34
35 public class ProductServletTest {
36
37         private ProductServlet createTestSubject() {
38                 UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
39                 ProductBusinessLogic productBusinessLogic = mock(ProductBusinessLogic.class);
40                 ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
41
42                 return new ProductServlet(userBusinessLogic, productBusinessLogic, componentsUtils);
43         }
44
45         
46         @Test
47         public void testCreateProduct() throws Exception {
48                 ProductServlet 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         @Test
60         public void testGetProductById() throws Exception {
61                 ProductServlet testSubject;
62                 String productId = "";
63                 HttpServletRequest request = null;
64                 String userId = "";
65                 Response result;
66
67                 // default test
68                 testSubject = createTestSubject();
69         }
70
71         
72         @Test
73         public void testGetServiceByNameAndVersion() throws Exception {
74                 ProductServlet testSubject;
75                 String productName = "";
76                 String productVersion = "";
77                 HttpServletRequest request = null;
78                 String userId = "";
79                 Response result;
80
81                 // default test
82                 testSubject = createTestSubject();
83         }
84
85         
86         @Test
87         public void testDeleteProduct() throws Exception {
88                 ProductServlet testSubject;
89                 String productId = "";
90                 HttpServletRequest request = null;
91                 Response result;
92
93                 // default test
94                 testSubject = createTestSubject();
95         }
96
97         
98         @Test
99         public void testUpdateProductMetadata() throws Exception {
100                 ProductServlet testSubject;
101                 String productId = "";
102                 String data = "";
103                 HttpServletRequest request = null;
104                 String userId = "";
105                 Response result;
106
107                 // default test
108                 testSubject = createTestSubject();
109         }
110
111         
112         @Test
113         public void testValidateServiceName() throws Exception {
114                 ProductServlet testSubject;
115                 String productName = "";
116                 HttpServletRequest request = null;
117                 String userId = "";
118                 Response result;
119
120                 // default test
121                 testSubject = createTestSubject();
122         }
123 }