running task tests on their own classpath

This commit is contained in:
Dmitry Avdeev
2012-01-30 10:37:03 +04:00
parent 65ea25ebeb
commit b652ad47a7
4 changed files with 17 additions and 5 deletions
@@ -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();
@@ -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;
@@ -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>");
}
@@ -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