added file to test JsonCallBackResponse.java
[music.git] / src / test / java / org / onap / music / unittests / jsonobjects / JsonCallBackResponseTest.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.ArrayList;
28 import java.util.HashMap;
29 import java.util.List;
30 import java.util.Map;
31
32 import org.junit.Before;
33 import org.junit.Test;
34 import org.onap.music.datastore.jsonobjects.JSONCallbackResponse;
35
36 public class JsonCallBackResponseTest {
37     
38     private JSONCallbackResponse jsonCallBackResponse;
39     
40     @Before
41     public void setUp()
42     {
43         jsonCallBackResponse  = new JSONCallbackResponse();
44     }
45     
46     @Test
47     public void testFullTable()
48     {
49         jsonCallBackResponse.setFull_table("fullTable");
50         assertEquals("fullTable", jsonCallBackResponse.getFull_table());
51     }
52     
53     @Test
54     public void testKeyspace()
55     {
56         jsonCallBackResponse.setKeyspace("keyspace");
57         assertEquals("keyspace", jsonCallBackResponse.getKeyspace());
58     }
59     
60     @Test
61     public void testOperation()
62     {
63         jsonCallBackResponse.setOperation("Operation");
64         assertEquals("Operation", jsonCallBackResponse.getOperation());
65     }
66     
67     @Test
68     public void testTable_name()
69     {
70         jsonCallBackResponse.setTable_name("Table_name");
71         assertEquals("Table_name", jsonCallBackResponse.getTable_name());
72     }
73     
74     
75     @Test
76     public void testPrimary_key()
77     {
78         jsonCallBackResponse.setPrimary_key("Primary_key");
79         assertEquals("Primary_key", jsonCallBackResponse.getPrimary_key());
80     }
81     
82     
83     @Test
84     public void testMiscObjects()
85     {
86         jsonCallBackResponse.setMiscObjects("MiscObjects");
87         assertEquals("MiscObjects", jsonCallBackResponse.getMiscObjects());
88     }
89     
90     @Test
91     public void testChangeValue()
92     {
93         Map<String, String> changeValue = new HashMap<>();
94         jsonCallBackResponse.setChangeValue(changeValue);
95         assertEquals(changeValue, jsonCallBackResponse.getChangeValue());
96     }
97     
98     @Test
99     public void testUpdateList()
100     {
101         List<String> list= new ArrayList<>();
102         jsonCallBackResponse.setUpdateList(list);
103         assertEquals(list, jsonCallBackResponse.getUpdateList());
104     }
105     
106     
107
108 }