running task tests on their own classpath
authorDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Mon, 30 Jan 2012 06:22:59 +0000 (10:22 +0400)
committerDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Mon, 30 Jan 2012 06:37:03 +0000 (10:37 +0400)
java/testFramework/src/com/intellij/testFramework/fixtures/LightCodeInsightFixtureTestCase.java
platform/testFramework/src/com/intellij/testFramework/PlatformTestCase.java
plugins/tasks/tasks-tests/test/com/intellij/tasks/TaskCompletionTest.java
plugins/tasks/tasks-tests/test/com/intellij/tasks/TaskManagerTestCase.java

index 8774292a3550052f7a5c3185f5949e0b57462543..38c344f16fba8729f7a32924a3a2fcdcd8a1c428 100644 (file)
@@ -24,10 +24,7 @@ import com.intellij.openapi.roots.LanguageLevelModuleExtension;
 import com.intellij.openapi.roots.ModifiableRootModel;
 import com.intellij.pom.java.LanguageLevel;
 import com.intellij.psi.*;
-import com.intellij.testFramework.IdeaTestCase;
-import com.intellij.testFramework.LightProjectDescriptor;
-import com.intellij.testFramework.PlatformTestUtil;
-import com.intellij.testFramework.UsefulTestCase;
+import com.intellij.testFramework.*;
 import com.intellij.testFramework.fixtures.impl.LightTempDirTestFixtureImpl;
 import org.jetbrains.annotations.NonNls;
 import org.jetbrains.annotations.NotNull;
@@ -55,6 +52,11 @@ public abstract class LightCodeInsightFixtureTestCase extends UsefulTestCase{
     IdeaTestCase.initPlatformPrefix();
   }
 
+  @SuppressWarnings("JUnitTestCaseWithNonTrivialConstructors")
+  public LightCodeInsightFixtureTestCase(String classToTest, String prefix) {
+    PlatformTestCase.initPlatformPrefix(classToTest, prefix);
+  }
+
   @Override
   protected void setUp() throws Exception {
     super.setUp();
index d575d7df5019989856c4e8d6711f39a4948b393b..867b6e25909f809bb7a80492aacebd78f3a7f925 100644 (file)
@@ -731,7 +731,7 @@ public abstract class PlatformTestCase extends UsefulTestCase implements DataPro
     initPlatformPrefix(IDEA_MARKER_CLASS, "PlatformLangXml");
   }
 
-  protected static void initPlatformPrefix(String classToTest, String prefix) {
+  public static void initPlatformPrefix(String classToTest, String prefix) {
     if (!ourPlatformPrefixInitialized) {
       ourPlatformPrefixInitialized = true;
       boolean isUltimate = true;
index 3af2d7c7b5c1027b3d5336d518a77d2524646f54..bde7713bfb9b47c65f97ae8f811791d5ca40f25a 100644 (file)
@@ -9,6 +9,7 @@ import com.intellij.tasks.impl.LocalTaskImpl;
 import com.intellij.tasks.impl.TaskCompletionContributor;
 import com.intellij.tasks.impl.TaskManagerImpl;
 import com.intellij.testFramework.MapDataContext;
+import com.intellij.testFramework.UsefulTestCase;
 import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
 
 import java.util.Arrays;
@@ -18,6 +19,10 @@ import java.util.Arrays;
  */
 public class TaskCompletionTest extends LightCodeInsightFixtureTestCase {
 
+  public TaskCompletionTest() {
+    super(UsefulTestCase.IDEA_MARKER_CLASS, "PlatformLangXml");
+  }
+
   public void testTaskCompletion() throws Exception {
     doTest("<caret>", "TEST-001: Test task<caret>");
   }
index 6cc70958912e8364eee7d6bac6ef579b9c8653c6..eafa7877eeb591fb59e276b878d626a993ff0533 100644 (file)
@@ -1,5 +1,6 @@
 package com.intellij.tasks;
 
+import com.intellij.testFramework.UsefulTestCase;
 import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
 
 /**
@@ -7,6 +8,10 @@ import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
  */
 public abstract class TaskManagerTestCase extends LightCodeInsightFixtureTestCase {
 
+  protected TaskManagerTestCase() {
+    super(UsefulTestCase.IDEA_MARKER_CLASS, "PlatformLangXml");
+  }
+
   protected TaskManager myManager;
 
   @Override