use of org.jetbrains.idea.devkit.inspections.RegistrationProblemsInspection 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