added file to test JsonNotification.java
[music.git] / src / test / java / org / onap / music / unittests / jsonobjects / JsonNotificationTest.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.JsonNotification;
33
34 public class JsonNotificationTest {
35
36     private JsonNotification jsonNotification;
37     
38     @Before
39     public void setUp()
40     {
41         jsonNotification= new JsonNotification();
42     }
43     
44     @Test
45     public void testGetSetNotify_field()
46     {
47         jsonNotification.setNotify_field("notify_field");
48         assertEquals("notify_field", jsonNotification.getNotify_field());
49     }
50     
51     @Test
52     public void testGetSetEndpoint()
53     {
54         jsonNotification.setEndpoint("endpoint");
55         assertEquals("endpoint", jsonNotification.getEndpoint());
56     }
57     
58     @Test
59     public void testGetSetUsername()
60     {
61         jsonNotification.setUsername("Username");
62         assertEquals("Username", jsonNotification.getUsername());
63     }
64     
65     @Test
66     public void testGetSetPassword()
67     {
68         jsonNotification.setPassword("Password");
69         assertEquals("Password", jsonNotification.getPassword());
70     }
71     
72     @Test
73     public void testGetSetResponse_body()
74     {
75         Map<String, String> ResponseBody= new HashMap<>();
76         jsonNotification.setResponse_body(ResponseBody);
77         assertEquals(ResponseBody, jsonNotification.getResponse_body());
78     }
79     
80     @Test
81     public void testGetSetNotify_change()
82     {
83         jsonNotification.setNotify_change("Notify_change");
84         assertEquals("Notify_change", jsonNotification.getNotify_change());
85     }
86     
87     @Test
88     public void testGetSetNotify_insert()
89     {
90         jsonNotification.setNotify_insert("Notify_insert");
91         assertEquals("Notify_insert", jsonNotification.getNotify_insert());
92     }
93     
94     @Test
95     public void testGetSetNotify_delete()
96     {
97         jsonNotification.setNotify_delete("Notify_delete");
98         assertEquals("Notify_delete", jsonNotification.getNotify_delete());
99     }
100     
101     @Test
102     public void testGetSetOperation_type()
103     {
104         jsonNotification.setOperation_type("Operation_type");
105         assertEquals("Operation_type", jsonNotification.getOperation_type());
106     }
107     
108     @Test
109     public void testGetSetTriggerName()
110     {
111         jsonNotification.setTriggerName("TriggerName");
112         assertEquals("TriggerName", jsonNotification.getTriggerName());
113     }
114     
115     
116 }