From cd322c56a0b41bc0796b45ff633827ad8a60dd39 Mon Sep 17 00:00:00 2001 From: Eldar Abusalimov Date: Wed, 1 Mar 2017 14:01:00 +0300 Subject: [PATCH] testFramework: (testing) Fix type parameters in assertThrows() Follows-up: IDEA-CR-18741 testFramework: (testing) Add UsefulTestCase.assertThrows() --- .../src/com/intellij/testFramework/UsefulTestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java b/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java index cf1bbf510df4..c3709477425b 100644 --- a/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java +++ b/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java @@ -879,7 +879,7 @@ public abstract class UsefulTestCase extends TestCase { * @param exceptionClass Expected exception type * @param runnable Block annotated with some exception type */ - protected void assertThrows(@NotNull Class exceptionClass, + protected void assertThrows(@NotNull Class exceptionClass, @NotNull ThrowableRunnable 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 void assertThrows(@NotNull Class exceptionClass, @Nullable String expectedErrorMsg, + protected void assertThrows(@NotNull Class exceptionClass, @Nullable String expectedErrorMsg, @NotNull ThrowableRunnable runnable) throws T { assertExceptionOccurred(true, new AbstractExceptionCase() { @Override