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.JsonNotification;
34 public class JsonNotificationTest {
36 private JsonNotification jsonNotification;
41 jsonNotification= new JsonNotification();
45 public void testGetSetNotify_field()
47 jsonNotification.setNotify_field("notify_field");
48 assertEquals("notify_field", jsonNotification.getNotify_field());
52 public void testGetSetEndpoint()
54 jsonNotification.setEndpoint("endpoint");
55 assertEquals("endpoint", jsonNotification.getEndpoint());
59 public void testGetSetUsername()
61 jsonNotification.setUsername("Username");
62 assertEquals("Username", jsonNotification.getUsername());
66 public void testGetSetPassword()
68 jsonNotification.setPassword("Password");
69 assertEquals("Password", jsonNotification.getPassword());
73 public void testGetSetResponse_body()
75 Map<String, String> ResponseBody= new HashMap<>();
76 jsonNotification.setResponse_body(ResponseBody);
77 assertEquals(ResponseBody, jsonNotification.getResponse_body());
81 public void testGetSetNotify_change()
83 jsonNotification.setNotify_change("Notify_change");
84 assertEquals("Notify_change", jsonNotification.getNotify_change());
88 public void testGetSetNotify_insert()
90 jsonNotification.setNotify_insert("Notify_insert");
91 assertEquals("Notify_insert", jsonNotification.getNotify_insert());
95 public void testGetSetNotify_delete()
97 jsonNotification.setNotify_delete("Notify_delete");
98 assertEquals("Notify_delete", jsonNotification.getNotify_delete());
102 public void testGetSetOperation_type()
104 jsonNotification.setOperation_type("Operation_type");
105 assertEquals("Operation_type", jsonNotification.getOperation_type());
109 public void testGetSetTriggerName()
111 jsonNotification.setTriggerName("TriggerName");
112 assertEquals("TriggerName", jsonNotification.getTriggerName());