2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright (c) 2017 AT&T Intellectual Property
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.*;
26 import java.util.HashMap;
28 import org.junit.Before;
29 import org.junit.Test;
30 import org.onap.music.datastore.jsonobjects.JsonTable;
32 public class JsonTableTest {
42 public void testGetConsistencyInfo() {
43 Map<String, String> mapSs = new HashMap<>();
44 mapSs.put("k1", "one");
45 jt.setConsistencyInfo(mapSs);
46 assertEquals("one",jt.getConsistencyInfo().get("k1"));
50 public void testGetProperties() {
51 Map<String, Object> properties = new HashMap<>();
52 properties.put("k1", "one");
53 jt.setProperties(properties);
57 public void testGetFields() {
58 Map<String, String> fields = new HashMap<>();
59 fields.put("k1", "one");
61 assertEquals("one",jt.getFields().get("k1"));
65 public void testGetKeyspaceName() {
66 String keyspace = "keyspace";
67 jt.setKeyspaceName(keyspace);
68 assertEquals(keyspace,jt.getKeyspaceName());
72 public void testGetTableName() {
73 String table = "table";
74 jt.setTableName(table);
75 assertEquals(table,jt.getTableName());
79 public void testGetSortingKey() {
80 String sortKey = "sortkey";
81 jt.setSortingKey(sortKey);
82 assertEquals(sortKey,jt.getSortingKey());
86 public void testGetClusteringOrder() {
87 String clusteringOrder = "clusteringOrder";
88 jt.setClusteringOrder(clusteringOrder);
89 assertEquals(clusteringOrder,jt.getClusteringOrder());
93 public void testGetPrimaryKey() {
94 String primaryKey = "primaryKey";
95 jt.setPrimaryKey(primaryKey);
96 assertEquals(primaryKey,jt.getPrimaryKey());