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