Java 20277 (#14046)
* JAVA-20277 GitHub Issue: Regarding article Introduction to JsonPath * JAVA-20277 Code Review Changes
This commit is contained in:
parent
30eb8c30ad
commit
539bf3438d
|
@ -103,11 +103,11 @@ public class ServiceIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void givenJsonPathWithFilterPredicate_whenReadingRootNode_thenCorrect() {
|
||||
Filter expensiveFilter = Filter.filter(Criteria.where("director")
|
||||
Filter directorSamMendesFilter = Filter.filter(Criteria.where("director")
|
||||
.contains("Sam Mendes"));
|
||||
List<Map<String, Object>> predicate = JsonPath.parse(jsonString)
|
||||
.read("$[?]['director']", expensiveFilter);
|
||||
assertEquals(predicate.size(), 2);
|
||||
List<Map<String, Object>> samMendesMovies = JsonPath.parse(jsonString)
|
||||
.read("$[?]['director']", directorSamMendesFilter);
|
||||
assertEquals(samMendesMovies.size(), 2);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue