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.exception;
23 import org.junit.Test;
24 import org.openecomp.sdc.exception.ResponseFormat.RequestErrorWrapper;
26 public class ResponseFormatTest {
28 private ResponseFormat createTestSubject() {
29 return new ResponseFormat();
33 public void testSetStatus() throws Exception {
34 ResponseFormat testSubject;
38 testSubject = createTestSubject();
39 testSubject.setStatus(status);
43 public void testGetStatus() throws Exception {
44 ResponseFormat testSubject;
48 testSubject = createTestSubject();
49 result = testSubject.getStatus();
53 public void testGetRequestError() throws Exception {
54 ResponseFormat testSubject;
55 RequestErrorWrapper result;
58 testSubject = createTestSubject();
59 result = testSubject.getRequestError();
63 public void testSetRequestError() throws Exception {
64 ResponseFormat testSubject;
65 RequestErrorWrapper requestErrorWrapper = null;
68 testSubject = createTestSubject();
69 testSubject.setRequestError(requestErrorWrapper);
73 public void testSetPolicyException() throws Exception {
74 ResponseFormat testSubject;
75 PolicyException policyException = null;
78 testSubject = createTestSubject();
79 testSubject.setPolicyException(policyException);
83 public void testSetServiceException() throws Exception {
84 ResponseFormat testSubject;
85 ServiceException serviceException = null;
88 testSubject = createTestSubject();
89 testSubject.setServiceException(serviceException);
93 public void testSetOkResponseInfo() throws Exception {
94 ResponseFormat testSubject;
95 OkResponseInfo okResponseInfo = null;
98 testSubject = createTestSubject();
99 testSubject.setOkResponseInfo(okResponseInfo);
103 public void testToString() throws Exception {
104 ResponseFormat testSubject;
108 testSubject = createTestSubject();
109 result = testSubject.toString();