diff options
author | Tschaen, Brendan <ctschaen@att.com> | 2019-07-01 15:00:07 -0400 |
---|---|---|
committer | Tschaen, Brendan <ctschaen@att.com> | 2019-07-01 15:00:07 -0400 |
commit | 5b43c6998e98f2fe9695f8dc9dc86be8bac2a320 (patch) | |
tree | f1080bd828eb785664c4ef8bfd4b0e5e3d21c0e6 /src/test/java | |
parent | 960971d2b7cb4915925ea37ecc78e484b42d51af (diff) |
Enhance PreparedQueryObject
Change-Id: I3da1ff5b5e8b63b6cf15a16cec5660e9ec9cf73d
Issue-ID: MUSIC-422
Signed-off-by: Tschaen, Brendan <ctschaen@att.com>
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/org/onap/music/datastore/PreparedQueryObjectTest.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/java/org/onap/music/datastore/PreparedQueryObjectTest.java b/src/test/java/org/onap/music/datastore/PreparedQueryObjectTest.java index 71e484a7..7ab7d148 100644 --- a/src/test/java/org/onap/music/datastore/PreparedQueryObjectTest.java +++ b/src/test/java/org/onap/music/datastore/PreparedQueryObjectTest.java @@ -72,4 +72,30 @@ public class PreparedQueryObjectTest { assertEquals("primaryKeyValue", preparedQueryObject.getPrimaryKeyValue()); } + @Test + public void testAddValue() { + preparedQueryObject.addValue("one"); + assertEquals("one", preparedQueryObject.getValues().get(0)); + } + + @Test + public void testAddValues() { + preparedQueryObject.addValues("one", "two", "three"); + assertEquals(3, preparedQueryObject.getValues().size()); + assertEquals("two", preparedQueryObject.getValues().get(1)); + } + + @Test + public void testConstructorQuery() { + preparedQueryObject = new PreparedQueryObject("some query string"); + assertEquals("some query string", preparedQueryObject.getQuery()); + } + + @Test + public void testConstructorQueryValues() { + preparedQueryObject = new PreparedQueryObject("another query string", "a", "b", "c"); + assertEquals("another query string", preparedQueryObject.getQuery()); + assertEquals(3, preparedQueryObject.getValues().size()); + assertEquals("b", preparedQueryObject.getValues().get(1)); + } } |