catalog-be servlets refactoring
[sdc.git] / catalog-be / src / test / java / org / openecomp / sdc / be / servlets / AttributeServletTest.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.ServletUtils;
34 import org.openecomp.sdc.be.model.PropertyDefinition;
35 import org.openecomp.sdc.be.user.UserBusinessLogic;
36 import org.openecomp.sdc.exception.ResponseFormat;
37
38 import com.google.common.base.Equivalence.Wrapper;
39
40 public class AttributeServletTest {
41
42         private AttributeServlet createTestSubject() {
43                 UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
44                 ComponentInstanceBusinessLogic componentInstanceBL = mock(ComponentInstanceBusinessLogic.class);
45                 ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
46                 ServletUtils servletUtils = mock(ServletUtils.class);
47                 ResourceImportManager resourceImportManager = mock(ResourceImportManager.class);
48
49                 return new AttributeServlet(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils,
50                         resourceImportManager);
51         }
52
53         
54         @Test
55         public void testCreateAttribute() throws Exception {
56                 AttributeServlet testSubject;
57                 String resourceId = "";
58                 String data = "";
59                 HttpServletRequest request = null;
60                 String userId = "";
61                 Response result;
62
63                 // default test
64                 testSubject = createTestSubject();
65         }
66
67         
68         @Test
69         public void testUpdateAttribute() throws Exception {
70                 AttributeServlet testSubject;
71                 String resourceId = "";
72                 String attributeId = "";
73                 String data = "";
74                 HttpServletRequest request = null;
75                 String userId = "";
76                 Response result;
77
78                 // default test
79                 testSubject = createTestSubject();
80         }
81
82         
83         @Test
84         public void testDeleteAttribute() throws Exception {
85                 AttributeServlet testSubject;
86                 String resourceId = "";
87                 String attributeId = "";
88                 HttpServletRequest request = null;
89                 String userId = "";
90                 Response result;
91
92                 // default test
93                 testSubject = createTestSubject();
94         }
95
96         
97         @Test
98         public void testBuildAttributeFromString() throws Exception {
99         AttributeServlet testSubject;String data = "";
100         Wrapper<PropertyDefinition> attributesWrapper = null;
101         Wrapper<ResponseFormat> errorWrapper = null;
102         
103         
104         // default test
105         }
106 }