added file to test JsonCallBack.java
[music.git] / src / test / java / org / onap / music / unittests / jsonobjects / JsonCallBackTest.java
1 /*
2  * ============LICENSE_START==========================================
3  * org.onap.music
4  * ===================================================================
5  *  Copyright (c) 2019 IBM.
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  * 
19  * ============LICENSE_END=============================================
20  * ====================================================================
21  */
22
23 package org.onap.music.unittests.jsonobjects;
24
25 import static org.junit.Assert.assertEquals;
26
27 import java.util.HashMap;
28 import java.util.Map;
29
30 import org.junit.Before;
31 import org.junit.Test;
32 import org.onap.music.datastore.jsonobjects.JsonCallback;
33
34 public class JsonCallBackTest {
35     private JsonCallback jsonCallBack;
36
37     @Before
38     public void setUp() {
39         jsonCallBack = new JsonCallback();
40     }
41
42     @Test
43     public void testUuid() {
44         jsonCallBack.setUuid("uuid");
45         assertEquals("uuid", jsonCallBack.getUuid());
46     }
47
48     @Test
49     public void testApplicationName() {
50         jsonCallBack.setApplicationName("ApplicationName");
51         assertEquals("ApplicationName", jsonCallBack.getApplicationName());
52     }
53
54     @Test
55     public void testNotifyOn() {
56         jsonCallBack.setNotifyOn("NotifyOn");
57         assertEquals("NotifyOn", jsonCallBack.getNotifyOn());
58     }
59
60     @Test
61     public void testApplicationUsername() {
62         jsonCallBack.setApplicationUsername("ApplicationUsername");
63         assertEquals("ApplicationUsername", jsonCallBack.getApplicationUsername());
64     }
65
66     @Test
67     public void testApplicationPassword() {
68         jsonCallBack.setApplicationPassword("ApplicationPassword");
69         assertEquals("ApplicationPassword", jsonCallBack.getApplicationPassword());
70     }
71
72     @Test
73     public void testApplicationNotificationEndpoint() {
74         jsonCallBack.setApplicationNotificationEndpoint("ApplicationNotificationEndpoint");
75         assertEquals("ApplicationNotificationEndpoint", jsonCallBack.getApplicationNotificationEndpoint());
76     }
77
78     @Test
79     public void testNotifyWhenChangeIn() {
80         jsonCallBack.setNotifyWhenChangeIn("NotifyWhenChangeIn");
81         assertEquals("NotifyWhenChangeIn", jsonCallBack.getNotifyWhenChangeIn());
82     }
83
84     @Test
85     public void testNotifyWhenInsertsIn() {
86         jsonCallBack.setNotifyWhenInsertsIn("NotifyWhenInsertsIn");
87         assertEquals("NotifyWhenInsertsIn", jsonCallBack.getNotifyWhenInsertsIn());
88     }
89
90     @Test
91     public void testNotifyWhenDeletesIn() {
92         jsonCallBack.setNotifyWhenDeletesIn("NotifyWhenDeletesIn");
93         assertEquals("NotifyWhenDeletesIn", jsonCallBack.getNotifyWhenDeletesIn());
94     }
95
96     @Test
97     public void testResponseBody() {
98         Map<String, String> response = new HashMap<>();
99         jsonCallBack.setResponseBody(response);
100         assertEquals(response, jsonCallBack.getResponseBody());
101     }
102
103 }