catalog-be servlets refactoring
[sdc.git] / catalog-be / src / test / java / org / openecomp / sdc / be / servlets / GroupServletTest.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.ResourceImportManager;
32 import org.openecomp.sdc.be.impl.ComponentsUtils;
33 import org.openecomp.sdc.be.impl.DownloadArtifactLogic;
34 import org.openecomp.sdc.be.impl.ServletUtils;
35 import org.openecomp.sdc.be.resources.api.IResourceUploader;
36 import org.openecomp.sdc.be.user.UserBusinessLogic;
37
38 public class GroupServletTest {
39
40         private GroupServlet createTestSubject() {
41                 UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
42                 GroupBusinessLogic groupBL = mock(GroupBusinessLogic.class);
43                 ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
44                 ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
45                 ServletUtils servletUtils = mock(ServletUtils.class);
46                 ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
47                 return new GroupServlet(userBusinessLogic, groupBL, componentInstanceBL, componentsUtils, servletUtils,
48                         resourceImportManager);
49         }
50
51         
52         @Test
53         public void testGetGroupArtifactById() throws Exception {
54                 GroupServlet testSubject;
55                 String containerComponentType = "";
56                 String componentId = "";
57                 String groupId = "";
58                 HttpServletRequest request = null;
59                 String userId = "";
60                 Response result;
61
62                 // default test
63         }
64
65         
66         @Test
67         public void testUpdateGroupMetadata() throws Exception {
68                 GroupServlet testSubject;
69                 String containerComponentType = "";
70                 String componentId = "";
71                 String groupUniqueId = "";
72                 String data = "";
73                 HttpServletRequest request = null;
74                 String userId = "";
75                 Response result;
76
77                 // default test
78                 testSubject = createTestSubject();
79         }
80 }