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.ArrayList;
28 import java.util.HashMap;
29 import java.util.List;
32 import org.junit.Before;
33 import org.junit.Test;
34 import org.onap.music.datastore.jsonobjects.JSONCallbackResponse;
36 public class JsonCallBackResponseTest {
38 private JSONCallbackResponse jsonCallBackResponse;
43 jsonCallBackResponse = new JSONCallbackResponse();
47 public void testFullTable()
49 jsonCallBackResponse.setFull_table("fullTable");
50 assertEquals("fullTable", jsonCallBackResponse.getFull_table());
54 public void testKeyspace()
56 jsonCallBackResponse.setKeyspace("keyspace");
57 assertEquals("keyspace", jsonCallBackResponse.getKeyspace());
61 public void testOperation()
63 jsonCallBackResponse.setOperation("Operation");
64 assertEquals("Operation", jsonCallBackResponse.getOperation());
68 public void testTable_name()
70 jsonCallBackResponse.setTable_name("Table_name");
71 assertEquals("Table_name", jsonCallBackResponse.getTable_name());
76 public void testPrimary_key()
78 jsonCallBackResponse.setPrimary_key("Primary_key");
79 assertEquals("Primary_key", jsonCallBackResponse.getPrimary_key());
84 public void testMiscObjects()
86 jsonCallBackResponse.setMiscObjects("MiscObjects");
87 assertEquals("MiscObjects", jsonCallBackResponse.getMiscObjects());
91 public void testChangeValue()
93 Map<String, String> changeValue = new HashMap<>();
94 jsonCallBackResponse.setChangeValue(changeValue);
95 assertEquals(changeValue, jsonCallBackResponse.getChangeValue());
99 public void testUpdateList()
101 List<String> list= new ArrayList<>();
102 jsonCallBackResponse.setUpdateList(list);
103 assertEquals(list, jsonCallBackResponse.getUpdateList());