2 * ============LICENSE_START==========================================
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
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.
19 * ============LICENSE_END=============================================
20 * ====================================================================
23 package org.onap.music.unittests.jsonobjects;
25 import static org.junit.Assert.assertEquals;
27 import java.util.HashMap;
30 import org.junit.Before;
31 import org.junit.Test;
32 import org.onap.music.datastore.jsonobjects.JsonCallback;
34 public class JsonCallBackTest {
35 private JsonCallback jsonCallBack;
39 jsonCallBack = new JsonCallback();
43 public void testUuid() {
44 jsonCallBack.setUuid("uuid");
45 assertEquals("uuid", jsonCallBack.getUuid());
49 public void testApplicationName() {
50 jsonCallBack.setApplicationName("ApplicationName");
51 assertEquals("ApplicationName", jsonCallBack.getApplicationName());
55 public void testNotifyOn() {
56 jsonCallBack.setNotifyOn("NotifyOn");
57 assertEquals("NotifyOn", jsonCallBack.getNotifyOn());
61 public void testApplicationUsername() {
62 jsonCallBack.setApplicationUsername("ApplicationUsername");
63 assertEquals("ApplicationUsername", jsonCallBack.getApplicationUsername());
67 public void testApplicationPassword() {
68 jsonCallBack.setApplicationPassword("ApplicationPassword");
69 assertEquals("ApplicationPassword", jsonCallBack.getApplicationPassword());
73 public void testApplicationNotificationEndpoint() {
74 jsonCallBack.setApplicationNotificationEndpoint("ApplicationNotificationEndpoint");
75 assertEquals("ApplicationNotificationEndpoint", jsonCallBack.getApplicationNotificationEndpoint());
79 public void testNotifyWhenChangeIn() {
80 jsonCallBack.setNotifyWhenChangeIn("NotifyWhenChangeIn");
81 assertEquals("NotifyWhenChangeIn", jsonCallBack.getNotifyWhenChangeIn());
85 public void testNotifyWhenInsertsIn() {
86 jsonCallBack.setNotifyWhenInsertsIn("NotifyWhenInsertsIn");
87 assertEquals("NotifyWhenInsertsIn", jsonCallBack.getNotifyWhenInsertsIn());
91 public void testNotifyWhenDeletesIn() {
92 jsonCallBack.setNotifyWhenDeletesIn("NotifyWhenDeletesIn");
93 assertEquals("NotifyWhenDeletesIn", jsonCallBack.getNotifyWhenDeletesIn());
97 public void testResponseBody() {
98 Map<String, String> response = new HashMap<>();
99 jsonCallBack.setResponseBody(response);
100 assertEquals(response, jsonCallBack.getResponseBody());