JUNIT for Jsonselect class
[music.git] / music-core / src / test / java / org / onap / music / datastore / jsonobjects / JsonSelectTest.java
index 21c022a..baada1d 100644 (file)
@@ -33,10 +33,10 @@ import java.util.Map;
 import org.junit.Test;
 
 public class JsonSelectTest {
+    JsonSelect js = new JsonSelect();
 
     @Test
     public void testGetConsistencyInfo() {
-        JsonSelect js = new JsonSelect();
         Map<String, String> mapSs = new HashMap<>();
         mapSs.put("k1", "one");
         js.setConsistencyInfo(mapSs);
@@ -45,11 +45,24 @@ public class JsonSelectTest {
 
     @Test
     public void testSerialize() throws IOException {
-        JsonSelect js = new JsonSelect();
         Map<String, String> mapSs = new HashMap<>();
         mapSs.put("Key", "Value");
         js.setConsistencyInfo(mapSs);
         js.serialize();
     }
 
+    @Test
+    public void testGetKeyspaceName() {
+        js.setKeyspaceName("testkeyspace");
+        assertEquals("testkeyspace",js.getKeyspaceName());
+
+    }
+
+    @Test
+    public void testGetTableName() {
+        js.setTableName("testkeyspace");
+        assertEquals("testkeyspace",js.getTableName());
+
+    }
+
 }