use of com.intellij.testFramework.fixtures.JavaTestFixtureFactory in project intellij-community by JetBrains.
the class AntMultiFileCompletionTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
final JavaTestFixtureFactory fixtureFactory = JavaTestFixtureFactory.getFixtureFactory();
final TestFixtureBuilder<IdeaProjectTestFixture> testFixtureBuilder = fixtureFactory.createLightFixtureBuilder();
myFixture = fixtureFactory.createCodeInsightFixture(testFixtureBuilder.getFixture());
myFixture.setTestDataPath(getTestDataPath());
myFixture.setUp();
}
use of com.intellij.testFramework.fixtures.JavaTestFixtureFactory in project intellij-community by JetBrains.
the class CreateClassFixTest method setUp.
@Before
public void setUp() throws Exception {
super.setUp();
final Ref<Exception> ex = new Ref<>();
Runnable runnable = new Runnable() {
public void run() {
try {
CreateClassFixTest.super.setUp();
final JavaTestFixtureFactory fixtureFactory = JavaTestFixtureFactory.getFixtureFactory();
final TestFixtureBuilder<IdeaProjectTestFixture> testFixtureBuilder = JavaTestFixtureFactory.createFixtureBuilder(getClass().getSimpleName());
myFixture = fixtureFactory.createCodeInsightFixture(testFixtureBuilder.getFixture());
myFixture.setTestDataPath(PluginPathManager.getPluginHomePath("devkit") + "/testData");
testFixtureBuilder.addModule(JavaModuleFixtureBuilder.class).addContentRoot(myFixture.getTempDirPath()).addSourceRoot(getSourceRoot());
myFixture.setUp();
myFixture.enableInspections(new RegistrationProblemsInspection());
} catch (Exception e) {
ex.set(e);
}
}
};
invokeTestRunnable(runnable);
final Exception exception = ex.get();
if (exception != null) {
throw exception;
}
}
Aggregations