List of Input Parameters for VSP
[sdc.git] / openecomp-be / lib / openecomp-sdc-externaltesting-lib / openecomp-sdc-externaltesting-api / src / test / java / org / openecomp / core / externaltesting / api / ErrorBodyTests.java
1 /*
2  * Copyright © 2019 iconectiv
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.openecomp.core.externaltesting.api;
18
19 import org.junit.Assert;
20 import org.junit.Test;
21
22 public class ErrorBodyTests {
23
24   @Test
25   public void testErrorBody() {
26     TestErrorBody b = new TestErrorBody();
27     b.setHttpStatus(404);
28     b.setMessage("message");
29     b.setCode("code");
30
31     Assert.assertEquals("code match", new Integer(404), b.getHttpStatus());
32     Assert.assertEquals("code message", "message", b.getMessage());
33     Assert.assertEquals("code code", "code", b.getCode());
34
35     TestErrorBody b2 = new TestErrorBody("code", 404, "message");
36
37     Assert.assertEquals("code match", new Integer(404), b2.getHttpStatus());
38     Assert.assertEquals("code message", "message", b2.getMessage());
39     Assert.assertEquals("code code", "code", b2.getCode());
40
41   }
42 }