run tests on module classpath: Inspection Gadgets
[idea/community.git] / plugins / InspectionGadgets / testsrc / com / IGInspectionTestCase.java
1 package com;
2
3 import com.intellij.codeInspection.LocalInspectionTool;
4 import com.intellij.codeInspection.ex.LocalInspectionToolWrapper;
5 import com.intellij.openapi.application.PluginPathManager;
6 import com.intellij.testFramework.InspectionTestCase;
7 import org.jetbrains.annotations.NonNls;
8
9 /**
10  * @author Alexey
11  */
12 public abstract class IGInspectionTestCase extends InspectionTestCase {
13
14   @SuppressWarnings({"JUnitTestCaseWithNonTrivialConstructors"})
15   public IGInspectionTestCase() {
16     System.setProperty("idea.platform.prefix", "Idea");
17   }
18
19   protected String getTestDataPath() {
20       return PluginPathManager.getPluginHomePath("InspectionGadgets") + "/test";
21   }
22
23   public void doTest(@NonNls final String folderName, final LocalInspectionTool tool) throws Exception {
24     super.doTest(folderName, new LocalInspectionToolWrapper(tool), "java 1.5");
25   }
26 }