2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright (c) 2017 AT&T Intellectual Property
6 * ===================================================================
7 * Modifications Copyright (c) 2019 IBM.
8 * ===================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
21 * ============LICENSE_END=============================================
22 * ====================================================================
25 package org.onap.music.unittests.jsonobjects;
27 import static org.junit.Assert.*;
28 import java.util.HashMap;
30 import org.junit.Before;
31 import org.junit.Test;
32 import org.onap.music.datastore.jsonobjects.JsonTable;
34 public class JsonTableTest {
44 public void testGetConsistencyInfo() {
45 Map<String, String> mapSs = new HashMap<>();
46 mapSs.put("k1", "one");
47 jt.setConsistencyInfo(mapSs);
48 assertEquals("one",jt.getConsistencyInfo().get("k1"));
52 public void testGetProperties() {
53 Map<String, Object> properties = new HashMap<>();
54 properties.put("k1", "one");
55 jt.setProperties(properties);
59 public void testGetFields() {
60 Map<String, String> fields = new HashMap<>();
61 fields.put("k1", "one");
63 assertEquals("one",jt.getFields().get("k1"));
67 public void testGetKeyspaceName() {
68 String keyspace = "keyspace";
69 jt.setKeyspaceName(keyspace);
70 assertEquals(keyspace,jt.getKeyspaceName());
74 public void testGetTableName() {
75 String table = "table";
76 jt.setTableName(table);
77 assertEquals(table,jt.getTableName());
81 public void testGetClusteringOrder() {
82 String clusteringOrder = "clusteringOrder";
83 jt.setClusteringOrder(clusteringOrder);
84 assertEquals(clusteringOrder,jt.getClusteringOrder());
88 public void testGetPrimaryKey() {
89 String primaryKey = "primaryKey";
90 jt.setPrimaryKey(primaryKey);
91 assertEquals(primaryKey,jt.getPrimaryKey());
95 public void testFilteringKey() {
96 jt.setFilteringKey("FilteringKey");
97 assertEquals("FilteringKey",jt.getFilteringKey());