Closed ggirou closed 12 years ago
Thanks Guillaume and Nicolas, I have integrated your code with few modifications :
@Test()
public void should_fail_if_actual_has_not_same_time() {
AssertionInfo info = someInfo();
try {
dates.assertHasTime(someInfo(), actual, 24L);
} catch (AssertionError e) {
verify(failures).failure(info, shouldHaveTime(actual, 24L));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
Why ? because failBecauseExpectedAssertionErrorWasNotThrown() throws an AssertionError thus it should not be called in a try catch block catching AssertionError.
Last thing : could you add an example of this new assertion in fest-examples project ? that would be great !
From Paris Hackergarten :)