Improve Test for 'and' and 'AND' in VC serialization
Change-Id: I5435608ee6242e65341d600f8ed3d8e6174b8e09
diff --git a/src/test/java/de/ids_mannheim/korap/query/test/collection/CollectionQueryProcessorTest.java b/src/test/java/de/ids_mannheim/korap/query/test/collection/CollectionQueryProcessorTest.java
index 5e407aa..465e534 100644
--- a/src/test/java/de/ids_mannheim/korap/query/test/collection/CollectionQueryProcessorTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/test/collection/CollectionQueryProcessorTest.java
@@ -615,6 +615,17 @@
assertEquals("textTypeArt", res.at("/collection/operands/1/operands/0/key").asText());
assertEquals(".*Kommentar.*", res.at("/collection/operands/1/operands/0/value").asText());
assertEquals("operation:and", res.at("/collection/operation").asText());
+
+ collection = "corpusSigle = /HMP[0-9][0-9]/ and (textTypeArt=/.*Kommentar.*/ OR textTypeArt=/.*Leitartikel.*/)";
+ qs.setQuery(query, ql);
+ qs.setCollection(collection);
+ res = mapper.readTree(qs.toJSON());
+ assertEquals("corpusSigle", res.at("/collection/operands/0/key").asText());
+ assertEquals("HMP[0-9][0-9]", res.at("/collection/operands/0/value").asText());
+ assertEquals("operation:or", res.at("/collection/operands/1/operation").asText());
+ assertEquals("textTypeArt", res.at("/collection/operands/1/operands/0/key").asText());
+ assertEquals(".*Kommentar.*", res.at("/collection/operands/1/operands/0/value").asText());
+ assertEquals("operation:and", res.at("/collection/operation").asText());
}
@Test