Java 20277 (#14046)

* JAVA-20277 GitHub Issue: Regarding article Introduction to JsonPath

* JAVA-20277 Code Review Changes
This commit is contained in:
anuragkumawat 2023-05-19 08:48:58 +05:30 committed by GitHub
parent 30eb8c30ad
commit 539bf3438d
1 changed files with 4 additions and 4 deletions

View File

@ -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);
}
}