Using JUnit5 assertAll, I call a method to perform assertions but noticed that when the assertion should fail, the test actually passes. It seems calling a method like the below is being ignored.
assertAll(
() -> jsonAssertions(actual, expectedUrl)
);
private Executable[] jsonAssertions(String actual, String expectedUrl) {
return new Executable[] {
() -> ProductAssert.assertThat(actual).urlEquals(expectedUrl)
};
}
(ProductAssert is a custom assertJ assertion class).
This works fine though
assertAll(
() -> ProductAssert.assertThat(actual).urlEquals(expectedUrl)
);