2305cd3059df87cf58cddf82b9ce572397d0307a
[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 org.junit.Test;
24 import org.openecomp.sdc.be.components.impl.CapabilitiesBusinessLogic;
25 import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic;
26 import org.openecomp.sdc.be.components.impl.InterfaceOperationBusinessLogic;
27 import org.openecomp.sdc.be.components.impl.PropertyBusinessLogic;
28 import org.openecomp.sdc.be.components.impl.RelationshipTypeBusinessLogic;
29 import org.openecomp.sdc.be.components.impl.ResourceBusinessLogic;
30 import org.openecomp.sdc.be.components.impl.ResourceImportManager;
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 import javax.servlet.ServletContext;
36 import javax.servlet.http.HttpServletRequest;
37 import javax.ws.rs.core.Response;
38
39 import static org.mockito.Mockito.mock;
40
41 public class TypesFetchServletTest {
42
43         private TypesFetchServlet createTestSubject() {
44                 UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
45                 ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
46                 ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
47                 ServletUtils servletUtils = mock(ServletUtils.class);
48                 ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
49                 PropertyBusinessLogic propertyBusinessLogic = mock(PropertyBusinessLogic.class);
50                 RelationshipTypeBusinessLogic relationshipTypeBusinessLogic = mock(RelationshipTypeBusinessLogic.class);
51                 CapabilitiesBusinessLogic capabilitiesBusinessLogic = mock(CapabilitiesBusinessLogic.class);
52                 InterfaceOperationBusinessLogic interfaceOperationBusinessLogic = mock(InterfaceOperationBusinessLogic.class);
53                 ResourceBusinessLogic resourceBusinessLogic = mock(ResourceBusinessLogic.class);
54
55                 return new TypesFetchServlet(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils,
56                                 resourceImportManager, propertyBusinessLogic, relationshipTypeBusinessLogic, capabilitiesBusinessLogic,
57                                 interfaceOperationBusinessLogic, resourceBusinessLogic);
58         }
59
60         
61         @Test
62         public void testGetAllDataTypesServlet() throws Exception {
63                 TypesFetchServlet testSubject;
64                 HttpServletRequest request = null;
65                 String userId = "";
66                 Response result;
67
68                 // default test
69                 testSubject = createTestSubject();
70         }
71
72         
73         @Test
74         public void testGetPropertyBL() throws Exception {
75                 TypesFetchServlet testSubject;
76                 ServletContext context = null;
77                 PropertyBusinessLogic result;
78
79                 // default test
80                 testSubject = createTestSubject();
81         }
82 }