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