catalog-be servlets refactoring
[sdc.git] / catalog-be / src / test / java / org / openecomp / sdc / be / servlets / TypesFetchServletTest.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.ServletContext;
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.components.impl.*;
31 import org.openecomp.sdc.be.impl.ComponentsUtils;
32 import org.openecomp.sdc.be.impl.ServletUtils;
33 import org.openecomp.sdc.be.user.UserBusinessLogic;
34
35 public class TypesFetchServletTest {
36
37         private TypesFetchServlet createTestSubject() {
38                 UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
39                 ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
40                 ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
41                 ServletUtils servletUtils = mock(ServletUtils.class);
42                 ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
43                 PropertyBusinessLogic propertyBusinessLogic = mock(PropertyBusinessLogic.class);
44                 RelationshipTypeBusinessLogic relationshipTypeBusinessLogic = mock(RelationshipTypeBusinessLogic.class);
45                 CapabilitiesBusinessLogic capabilitiesBusinessLogic = mock(CapabilitiesBusinessLogic.class);
46                 InterfaceOperationBusinessLogic interfaceOperationBusinessLogic = mock(InterfaceOperationBusinessLogic.class);
47                 ResourceBusinessLogic resourceBusinessLogic = mock(ResourceBusinessLogic.class);
48
49                 return new TypesFetchServlet(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils,
50                                 resourceImportManager, propertyBusinessLogic, relationshipTypeBusinessLogic, capabilitiesBusinessLogic,
51                                 interfaceOperationBusinessLogic, resourceBusinessLogic);
52         }
53
54         
55         @Test
56         public void testGetAllDataTypesServlet() throws Exception {
57                 TypesFetchServlet testSubject;
58                 HttpServletRequest request = null;
59                 String userId = "";
60                 Response result;
61
62                 // default test
63                 testSubject = createTestSubject();
64         }
65
66         
67         @Test
68         public void testGetPropertyBL() throws Exception {
69                 TypesFetchServlet testSubject;
70                 ServletContext context = null;
71                 PropertyBusinessLogic result;
72
73                 // default test
74                 testSubject = createTestSubject();
75         }
76 }