summaryrefslogtreecommitdiffstats
path: root/documentgen-test
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-11-16 10:58:26 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2016-11-16 10:58:26 +0100
commit2bcaf96baa296ad84881c79f537b1acb3805b160 (patch)
treeda069c3f1cfda45d6aaa3c6b1952b75b155cff26 /documentgen-test
parent0cda61be099cc167ca3b896ce201e5e21fd6e152 (diff)
Preserve old behavior where doing a setFieldValue on a string field,
would make an empty spanTreeMap when there where no annotations. However this is different that using the generated setter, which will not touch any annotations. But that is the same issue as always.
Diffstat (limited to 'documentgen-test')
-rw-r--r--documentgen-test/src/test/java/com/yahoo/vespa/config/DocumentGenPluginTest.java7
1 files changed, 7 insertions, 0 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 1f918fb69aa..59e10bbce00 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
@@ -129,6 +129,13 @@ public class DocumentGenPluginTest {
}
@Test
+ public void testSetString() {
+ Book book = new Book(new DocumentId("doc:book:0"));
+ book.setFieldValue("author", "Herman Melville");
+ assertNotEquals(null, book.authorSpanTrees());
+ }
+
+ @Test
public void testremoveFieldValue() {
Book book = getBook();
book.setAuthor(null);