Skip to content

Commit

Permalink
#512 Tolerance test
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-krecan committed May 5, 2022
1 parent d88ef34 commit 4bfae60
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -1152,6 +1152,15 @@ void testEqualsToArray() {
assertThatJson("{\"test\":[1,2,3]}").node("test").isEqualTo(new int[]{1, 2, 3});
}

@Test
void assertTolerance() {
assertThatJson("{\"a\":1, \"b\":2.0}")
.withTolerance(0)
.isObject()
.containsEntry("a", json(1))
.containsEntry("b", json(2));
}

@Test
void testEqualsToList() {
assertThatJson("{\"test\":[1,2,3]}").node("test").isEqualTo(asList(1, 2, 3));
Expand Down

0 comments on commit 4bfae60

Please sign in to comment.