From d12da44e49d085e29cee412f4b15ec28908a0ce3 Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Wed, 23 Mar 2011 12:55:44 +0300 Subject: [PATCH] IDEA-54739: @PathVariable support: quick fixes --- .../testFramework/fixtures/CodeInsightTestUtil.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightTestUtil.java b/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightTestUtil.java index 10cfa406fe62..0f449c02f85d 100644 --- a/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightTestUtil.java +++ b/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightTestUtil.java @@ -46,6 +46,7 @@ import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.TestOnly; +import org.junit.Assert; import java.util.List; @@ -73,8 +74,9 @@ public class CodeInsightTestUtil { public static void doIntentionTest(@NotNull final CodeInsightTestFixture fixture, @NonNls final String action, @NotNull final String before, @NotNull final String after) { fixture.configureByFile(before); - final IntentionAction intentionAction = findIntentionByText(fixture.getAvailableIntentions(), action); - assert intentionAction != null : "Action not found: " + action; + List availableIntentions = fixture.getAvailableIntentions(); + final IntentionAction intentionAction = findIntentionByText(availableIntentions, action); + Assert.assertTrue("Action not found: " + action + " among " + availableIntentions, intentionAction != null); new WriteCommandAction(fixture.getProject()) { @Override protected void run(Result result) throws Throwable {