DMAAP-MR - Merge MR repos
[dmaap/messagerouter/messageservice.git] / src / test / java / org / onap / dmaap / mr / cambria / exception / ErrorResponseTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP Policy Engine
4  * ================================================================================
5  * Copyright (C) 2017 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.onap.dmaap.mr.cambria.exception;
22
23 import org.junit.After;
24 import org.junit.Before;
25 import org.junit.Test;
26 import org.onap.dmaap.dmf.mr.exception.ErrorResponse;
27
28 import static org.junit.Assert.assertTrue;
29
30 public class ErrorResponseTest {
31
32         @Before
33         public void setUp() throws Exception {
34                 
35         }
36
37         @After
38         public void tearDown() throws Exception {
39                 
40         }
41
42         
43         @Test
44         public void testGetHttpStatusCode() {
45                 
46                 ErrorResponse resp = new ErrorResponse(200, 500, "no error");
47                                 
48                 resp.getHttpStatusCode();
49                 assertTrue(true);
50                 
51
52         }
53         
54         @Test
55         public void tesSGetHttpStatusCode() {
56                 
57                 ErrorResponse resp = new ErrorResponse(200, 500, "no error");
58                                 
59                 resp.setHttpStatusCode(200);
60                 assertTrue(true);
61                 
62
63         }
64         
65         @Test
66         public void testGetMrErrorCode() {
67                 
68                 ErrorResponse resp = new ErrorResponse(200, 500, "no error");
69                                 
70                 resp.getMrErrorCode();
71                 assertTrue(true);
72                 
73
74         }
75         
76         @Test
77         public void testSetMrErrorCode() {
78                 
79                 ErrorResponse resp = new ErrorResponse(200, 500, "no error");
80                                 
81                 resp.setMrErrorCode(500);
82                 assertTrue(true);
83                 
84
85         }
86         
87         @Test
88         public void testGetErrorMessage() {
89                 
90                 ErrorResponse resp = new ErrorResponse(200, 500, "no error");
91                                 
92                 resp.getErrorMessage();
93                 assertTrue(true);
94                 
95
96         }
97         
98         @Test
99         public void testSetErrorMessage() {
100                 
101                 ErrorResponse resp = new ErrorResponse(200, 500, "no error");
102                                 
103                 resp.setErrorMessage("no error");
104                 assertTrue(true);
105                 
106
107         }
108         
109         @Test
110         public void testToString() {
111                 
112                 ErrorResponse resp = new ErrorResponse(200, 500, "no error");
113                                 
114                 resp.toString();
115                 assertTrue(true);
116                 
117
118         }
119         
120         @Test
121         public void testGetErrMapperStr1() {
122                 
123                 ErrorResponse resp = new ErrorResponse(200, 500, "no error");
124                                 
125                 resp.setHelpURL("/help");
126                 assertTrue(true);
127                 
128
129         }
130         
131         @Test
132         public void testGetErrMapperStr() {
133                 
134                 ErrorResponse resp = new ErrorResponse(200, 500, "no error");
135                                 
136                 resp.getHelpURL();
137                 assertTrue(true);
138                 
139
140         }
141         
142                 
143                 
144 }