2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright (c) 2017 AT&T Intellectual Property
6 * ===================================================================
7 * Modifications Copyright (c) 2019 Samsung
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.ArrayList;
29 import java.util.HashMap;
30 import java.util.List;
32 import org.junit.Before;
33 import org.junit.Test;
34 import org.onap.music.datastore.jsonobjects.JsonDelete;
36 public class JsonDeleteTest {
42 jd = new JsonDelete();
46 public void testGetConditions() {
47 Map<String,Object> mapSo = new HashMap<>();
48 mapSo.put("key1","one");
49 mapSo.put("key2","two");
50 jd.setConditions(mapSo);
51 assertEquals("one",jd.getConditions().get("key1"));
55 public void testGetConsistencyInfo() {
56 Map<String,String> mapSs = new HashMap<>();
57 mapSs.put("key3","three");
58 mapSs.put("key4","four");
59 jd.setConsistencyInfo(mapSs);
60 assertEquals("three",jd.getConsistencyInfo().get("key3"));
64 public void testGetColumns() {
65 List<String> ary = new ArrayList<>();
70 assertEquals("e1",jd.getColumns().get(0));
74 public void testGetTtl() {
76 assertEquals("2000",jd.getTtl());
80 public void testGetTimestamp() {
81 jd.setTimestamp("20:00");
82 assertEquals("20:00",jd.getTimestamp());