You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ExpectedException.none() is marked as deprecated but there are so many unit tests which depends on the function.
These cases can be rewritten by using Assert.assertThrows(Class<?> class, ThrowableRunnable run)
There are also Similar deprecation; expectIllegalStateIsNotShowingComponent and expectIllegalStateIsDisabledComponent
These can be implemented as like as followings;
public static AbstractStringAssert<?> assertThatIllegalStateExceptionCauseIsDisabledComponent(ThrowingRunnable r) {
Throwable t = Assert.assertThrows(IllegalStateException.class, r);
return assertThat(t.getMessage()).contains("Expecting component").contains("to be enabled");
}
public static AbstractStringAssert<?> assertThatIllegalStateExceptionCauseIsNotShowingComponent(ThrowingRunnable r) {
Throwable t = Assert.assertThrows(IllegalStateException.class, r);
return assertThat(t.getMessage()).contains("Expecting component").contains("to be shown on the screen");
}
public static AbstractStringAssert<?> assertThatIllegalStateExceptionCauseIsNotResizableComponent(ThrowingRunnable runnable) {
Throwable t = Assert.assertThrows(IllegalStateException.class, runnable);
return assertThat(t.getMessage()).contains("Expecting component").contains("to be resizable by the user");
}
The text was updated successfully, but these errors were encountered:
ExpectedException.none() is marked as deprecated but there are so many unit tests which depends on the function.
These cases can be rewritten by using
Assert.assertThrows(Class<?> class, ThrowableRunnable run)
There are also Similar deprecation;
expectIllegalStateIsNotShowingComponent
andexpectIllegalStateIsDisabledComponent
These can be implemented as like as followings;
The text was updated successfully, but these errors were encountered: