diff options
author | Nelson, Thomas (arthurdent3) <nelson24@att.com> | 2019-05-15 17:59:33 +0000 |
---|---|---|
committer | Nelson, Thomas (arthurdent3) <nelson24@att.com> | 2019-05-15 17:59:33 +0000 |
commit | b426a6e832df4db4a57c0d271559fd0b0926e02d (patch) | |
tree | d6c8b23ea14bb5a33d07dc747d9f8434d97406ab /src/test | |
parent | d6e7b63cc580e7b3822be61fe92a493ad5e222a3 (diff) |
Update junit test
Change-Id: I1c39d008958cebed0454b5a1f980e3c88082c876
Issue-ID: MUSIC-395
Signed-off-by: Nelson, Thomas (arthurdent3) <nelson24@att.com>
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/onap/music/unittests/jsonobjects/JsonInsertTest.java | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/test/java/org/onap/music/unittests/jsonobjects/JsonInsertTest.java b/src/test/java/org/onap/music/unittests/jsonobjects/JsonInsertTest.java index 69403cc7..535cdd84 100644 --- a/src/test/java/org/onap/music/unittests/jsonobjects/JsonInsertTest.java +++ b/src/test/java/org/onap/music/unittests/jsonobjects/JsonInsertTest.java @@ -23,8 +23,12 @@ package org.onap.music.unittests.jsonobjects; import static org.junit.Assert.*; + +import java.io.Serializable; import java.util.HashMap; import java.util.Map; + +import org.apache.commons.lang3.SerializationUtils; import org.junit.Test; import org.onap.music.datastore.jsonobjects.JsonInsert; @@ -74,13 +78,26 @@ public class JsonInsertTest { } @Test - public void testGetRow_specification() { + public void testGetRowSpecification() { + Map<String,Object> cons = new HashMap<>(); + cons.put("val1","one"); + cons.put("val2","two"); + ji.setRowSpecification(cons); + assertEquals("two",ji.getRowSpecification().get("val2")); + } + + @Test + public void testSerialize() { Map<String,Object> cons = new HashMap<>(); cons.put("val1","one"); cons.put("val2","two"); - ji.setRow_specification(cons); - assertEquals("two",ji.getRow_specification().get("val2")); + ji.setTimestamp("10:30"); + ji.setRowSpecification(cons); + byte[] test1 = ji.serialize(); + byte[] ji1 = SerializationUtils.serialize(ji); + assertArrayEquals(ji1,test1); } + } |