Skip to content

Commit

Permalink
Tests for Investigation Sample filtering #267
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-austin committed Oct 10, 2023
1 parent efd1261 commit f2e59e3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/java/org/icatproject/core/manager/TestSearchApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,16 @@ public void investigations() throws Exception {
pojos, "b");
lsr = searchApi.getResults(query, 100, null);
checkResults(lsr, 3L);

// Sample filtering
query = buildQuery("Investigation", null, null, null, null, null, null, new Filter("sample.sample.type.name", "test"));
lsr = searchApi.getResults(query, 5, null);
checkResults(lsr, 0L, 1L, 2L, 3L, 4L);

query = buildQuery("Investigation", null, null, null, null, null, null, new Filter("sample.sample.type.name", "fail"));
lsr = searchApi.getResults(query, 5, null);
checkResults(lsr);

}

@Test
Expand Down

0 comments on commit f2e59e3

Please sign in to comment.