mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
testFramework: (testing) Fix type parameters in assertThrows()
Follows-up: IDEA-CR-18741 testFramework: (testing) Add UsefulTestCase.assertThrows()
This commit is contained in:
@@ -879,7 +879,7 @@ public abstract class UsefulTestCase extends TestCase {
|
||||
* @param exceptionClass Expected exception type
|
||||
* @param runnable Block annotated with some exception type
|
||||
*/
|
||||
protected <T extends Throwable> void assertThrows(@NotNull Class<? extends T> exceptionClass,
|
||||
protected <T extends Throwable> void assertThrows(@NotNull Class<? extends Throwable> exceptionClass,
|
||||
@NotNull ThrowableRunnable<T> runnable) throws T {
|
||||
assertThrows(exceptionClass, null, runnable);
|
||||
}
|
||||
@@ -893,7 +893,7 @@ public abstract class UsefulTestCase extends TestCase {
|
||||
* @param runnable Block annotated with some exception type
|
||||
*/
|
||||
@SuppressWarnings({"unchecked", "SameParameterValue"})
|
||||
protected <T extends Throwable> void assertThrows(@NotNull Class<?> exceptionClass, @Nullable String expectedErrorMsg,
|
||||
protected <T extends Throwable> void assertThrows(@NotNull Class<? extends Throwable> exceptionClass, @Nullable String expectedErrorMsg,
|
||||
@NotNull ThrowableRunnable<T> runnable) throws T {
|
||||
assertExceptionOccurred(true, new AbstractExceptionCase() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user