From 91a660447f7cd5d7662a27e852f4dbdb1a1187ca Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Tue, 26 Sep 2006 19:52:38 +0400 Subject: [PATCH] Needless tests removed --- .../daemon/quickFix/LightQuickFixTestCase.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/codeInsight/tests/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java b/codeInsight/tests/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java index 73311eb02b66..6ab0fbaffdfa 100644 --- a/codeInsight/tests/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java +++ b/codeInsight/tests/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java @@ -24,16 +24,18 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public abstract class LightQuickFixTestCase extends LightDaemonAnalyzerTestCase { + @NonNls private static final String BEFORE_PREFIX = "before"; + protected boolean shouldBeAvailableAfterExecution() { return false; } - protected void doTestFor(final String testName) throws Exception { + private void doTestFor(final String testName) throws Exception { CommandProcessor.getInstance().executeCommand(getProject(), new Runnable() { public void run() { ApplicationManager.getApplication().runWriteAction(new Runnable() { public void run() { - final String relativePath = getBasePath() + "/before" + testName; + final String relativePath = getBasePath() + "/" + BEFORE_PREFIX + testName; final String testFullPath = getTestDataPath().replace(File.separatorChar, '/') + relativePath; final File ioFile = new File(testFullPath); try { @@ -60,6 +62,7 @@ public abstract class LightQuickFixTestCase extends LightDaemonAnalyzerTestCase }); } }, "", ""); + System.out.print(testName + " "); } protected void afterActionCompleted(final String testName, final String contents) { @@ -122,14 +125,12 @@ public abstract class LightQuickFixTestCase extends LightDaemonAnalyzerTestCase File testDir = new File(testDirPath); final File[] files = testDir.listFiles(new FilenameFilter() { public boolean accept(File dir, @NonNls String name) { - return name.startsWith("before"); + return name.startsWith(BEFORE_PREFIX); } }); for (File file : files) { - final String testName = file.getName().substring("before".length()); + final String testName = file.getName().substring(BEFORE_PREFIX.length()); doTestFor(testName); - //noinspection UseOfSystemOutOrSystemErr - System.out.print(testName + " "); } assertTrue("Test files not found in "+testDirPath,files.length != 0); }