Skip to content

Commit 919422e

Browse files
committed
tests for not overlapping with tolerance
1 parent 1f710ca commit 919422e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/test/java/rectangles/TestAssumptions.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ public static boolean isNotOverlapping(WebElement root, WebElement other, int to
198198
return validate(root, uiValidator -> uiValidator.isNotOverlapping(other, "Blub"), tolerance);
199199
}
200200

201+
public static boolean isNotOverlapping(WebElement root, List<WebElement> others, int tolerance) {
202+
return validate(root, others, UIValidator::isNotOverlapping, tolerance);
203+
}
204+
201205
public static boolean doNotOverlap(List<WebElement> elements) {
202206
return doNotOverlap(elements, 0);
203207
}

src/test/java/rectangles/ToleranceOnNegativeAssumptionsTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ public void isNotOverlappingWithTolerance() {
4545
}
4646

4747
private AbstractBooleanAssert<?> assertThatNotOverlappingWithTolerance(int x, int y) {
48-
return assertThat(isNotOverlapping(root, createElement(x, y), 1) && doNotOverlap(asList(root, createElement(x, y)), 1));
48+
return assertThat(isNotOverlapping(root, createElement(x, y), 1) &&
49+
doNotOverlap(asList(root, createElement(x, y)), 1) &&
50+
isNotOverlapping(root, asList(createElement(x,y)), 1));
4951
}
5052

5153

0 commit comments

Comments
 (0)