commit | 753c5387b9469a1b50289abe0ce6b10e54387255 | [log] [tgz] |
---|---|---|
author | Akron <nils@diewald-online.de> | Wed Aug 09 12:11:24 2017 +0200 |
committer | Akron <nils@diewald-online.de> | Wed Aug 09 12:11:24 2017 +0200 |
tree | 7be38acc31cc7861e42315ad61b1a93cb021f4bc | |
parent | d3ee222eb40e8bdc05946d6405fc3914ff8790f0 [diff] |
Added test for wildcard serialization in Cosmas2 Change-Id: Ia983a3f6484b003ffcddcbb83b943390bcc417d6
diff --git a/src/test/java/de/ids_mannheim/korap/test/cosmas2/Cosmas2QueryProcessorTest.java b/src/test/java/de/ids_mannheim/korap/test/cosmas2/Cosmas2QueryProcessorTest.java index b703ca3..57cbc94 100644 --- a/src/test/java/de/ids_mannheim/korap/test/cosmas2/Cosmas2QueryProcessorTest.java +++ b/src/test/java/de/ids_mannheim/korap/test/cosmas2/Cosmas2QueryProcessorTest.java
@@ -1678,6 +1678,16 @@ .asText()); } + @Test + public void testWildcard () throws JsonProcessingException, IOException { + query = "meine* /+w1:2,s0 &Erfahrung"; + qs.setQuery(query, "cosmas2"); + res = mapper.readTree(qs.toJSON()); + assertEquals("type:wildcard", + res.at("/query/operands/0/operands/0/wrap/type").asText()); + assertEquals("meine*", + res.at("/query/operands/0/operands/0/wrap/key").asText()); + }; @Test public void testErrors () throws JsonProcessingException, IOException {