diff options
author | Jon Bratseth <bratseth@verizonmedia.com> | 2019-06-28 11:32:57 -0500 |
---|---|---|
committer | Jon Bratseth <bratseth@verizonmedia.com> | 2019-06-28 11:32:57 -0500 |
commit | 609ab45a9eded61cef79eeb1941b6f06cb713cb6 (patch) | |
tree | fbc07799e06f982d53167ff2021e5a9329078a9c /documentgen-test | |
parent | 781d6dfd8afdcb1da0ce29ef37ccbc0c45dc155d (diff) | |
parent | e5d5699d6b0964cc97aacf77cccb0159d6299284 (diff) |
Merge with master
Diffstat (limited to 'documentgen-test')
-rw-r--r-- | documentgen-test/src/test/java/com/yahoo/vespa/config/DocumentGenPluginTest.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/documentgen-test/src/test/java/com/yahoo/vespa/config/DocumentGenPluginTest.java b/documentgen-test/src/test/java/com/yahoo/vespa/config/DocumentGenPluginTest.java index 25277e9cdfe..1e8c585b43e 100644 --- a/documentgen-test/src/test/java/com/yahoo/vespa/config/DocumentGenPluginTest.java +++ b/documentgen-test/src/test/java/com/yahoo/vespa/config/DocumentGenPluginTest.java @@ -321,9 +321,7 @@ public class DocumentGenPluginTest { verifyArrayOfStruct(toBook(copyBySerialization(book))); } - @Test - public void testMaps() { - Book book = getBook(); + private void verifyMaps(Book book) { assertTrue(book.getField("stringmap").getDataType() instanceof MapDataType); MapFieldValue mfv = (MapFieldValue) book.getFieldValue("stringmap"); assertEquals(mfv.get(new StringFieldValue("Melville")), new StringFieldValue("Moby Dick")); @@ -333,6 +331,8 @@ public class DocumentGenPluginTest { assertEquals(mfv.keySet().size(), 2); book.getStringmap().put("Melville", "MD"); assertEquals(mfv.keySet().size(), 3); + book.getStringmap().put("Melville", "Moby Dick"); + assertEquals(mfv.keySet().size(), 3); assertEquals(book.getStructmap().get(50).getS1(), "test s1"); MapFieldValue mfv2 = (MapFieldValue) book.getFieldValue("structmap"); @@ -342,6 +342,13 @@ public class DocumentGenPluginTest { } @Test + public void testMaps() { + Book book = getBook(); + verifyMaps(book); + verifyMaps(toBook(copyBySerialization(book))); + } + + @Test public void testWeightedSets() { Book book = getBook(); assertTrue(book.getField("mywsfloat").getDataType() instanceof WeightedSetDataType); |