Skip to content

Commit

Permalink
Fixed testing dory-vc statistics.
Browse files Browse the repository at this point in the history
Change-Id: I7a4185cbf620e47c01aafb96e7f3591aac868dce
  • Loading branch information
margaretha committed Sep 24, 2024
1 parent feb0cce commit 3fc1db7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/de/ids_mannheim/korap/dto/QueryDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
@Getter
@Setter
@JsonInclude(Include.NON_DEFAULT)
@JsonInclude(Include.NON_NULL)
public class QueryDto {

private int id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,20 @@ public void testEditCorpusQuery ()
assertEquals(node.at("/collection/@type").asText(), "koral:doc");
assertEquals(node.at("/collection/key").asText(), "corpusSigle");
assertEquals(node.at("/collection/value").asText(), "WPD17");

json = "{\"corpusQuery\": \"corpusSigle=GOE AND creationDate since "
+ "1820\"}";
editVC("dory", "dory", "dory-vc", json);
node = testRetrieveKoralQuery("dory", "dory-vc");
assertEquals(node.at("/collection/@type").asText(), "koral:docGroup");
assertEquals(node.at("/collection/operation").asText(),
"operation:and");
assertEquals(node.at("/collection/operands/0/key").asText(),
"corpusSigle");
assertEquals(node.at("/collection/operands/0/value").asText(), "GOE");
assertEquals(node.at("/collection/operands/1/key").asText(),
"creationDate");
assertEquals(node.at("/collection/operands/1/value").asText(), "1820");
}

private JsonNode testRetrieveKoralQuery (String username, String vcName)
Expand Down

0 comments on commit 3fc1db7

Please sign in to comment.