2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.sdc.be.servlets;
23 import static org.mockito.Mockito.mock;
25 import javax.servlet.http.HttpServletRequest;
26 import javax.ws.rs.core.Response;
28 import org.junit.Test;
29 import org.openecomp.sdc.be.components.impl.AdditionalInformationBusinessLogic;
30 import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic;
31 import org.openecomp.sdc.be.components.impl.GroupBusinessLogic;
32 import org.openecomp.sdc.be.impl.ComponentsUtils;
33 import org.openecomp.sdc.be.user.UserBusinessLogic;
36 public class AdditionalInformationServletTest {
38 private AdditionalInformationServlet createTestSubject() {
39 UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
40 ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
41 AdditionalInformationBusinessLogic additionalInformationBusinessLogic =
42 mock(AdditionalInformationBusinessLogic.class);
43 return new AdditionalInformationServlet(userBusinessLogic, componentsUtils,
44 additionalInformationBusinessLogic);
49 public void testCreateResourceAdditionalInformationLabel() throws Exception {
50 AdditionalInformationServlet testSubject;
51 String resourceId = "";
53 HttpServletRequest request = null;
54 String userUserId = "";
58 testSubject = createTestSubject();
64 public void testCreateServiceAdditionalInformationLabel() throws Exception {
65 AdditionalInformationServlet testSubject;
66 String serviceId = "";
68 HttpServletRequest request = null;
69 String userUserId = "";
73 testSubject = createTestSubject();
79 public void testUpdateResourceAdditionalInformationLabel() throws Exception {
80 AdditionalInformationServlet testSubject;
81 String resourceId = "";
84 HttpServletRequest request = null;
89 testSubject = createTestSubject();
95 public void testUpdateServiceAdditionalInformationLabel() throws Exception {
96 AdditionalInformationServlet testSubject;
97 String serviceId = "";
100 HttpServletRequest request = null;
105 testSubject = createTestSubject();
111 public void testUpdateResourceAdditionalInformationLabel_1() throws Exception {
112 AdditionalInformationServlet testSubject;
113 String resourceId = "";
115 HttpServletRequest request = null;
120 testSubject = createTestSubject();
126 public void testDeleteServiceAdditionalInformationLabel() throws Exception {
127 AdditionalInformationServlet testSubject;
128 String serviceId = "";
130 HttpServletRequest request = null;
135 testSubject = createTestSubject();
141 public void testGetResourceAdditionalInformationLabel() throws Exception {
142 AdditionalInformationServlet testSubject;
143 String resourceId = "";
145 HttpServletRequest request = null;
150 testSubject = createTestSubject();
156 public void testGetServiceAdditionalInformationLabel() throws Exception {
157 AdditionalInformationServlet testSubject;
158 String serviceId = "";
160 HttpServletRequest request = null;
165 testSubject = createTestSubject();
171 public void testGetAllResourceAdditionalInformationLabel() throws Exception {
172 AdditionalInformationServlet testSubject;
173 String resourceId = "";
174 HttpServletRequest request = null;
179 testSubject = createTestSubject();
185 public void testGetAllServiceAdditionalInformationLabel() throws Exception {
186 AdditionalInformationServlet testSubject;
187 String serviceId = "";
188 HttpServletRequest request = null;
193 testSubject = createTestSubject();