testDataProvider - assertion

This commit is contained in:
Anton Makeev
2012-03-09 17:27:31 +01:00
parent 8a94d630ca
commit 3d511ef0ac
@@ -40,6 +40,11 @@ public class TestDataProvider implements DataProvider {
@Override
public Object getData(@NonNls String dataId) {
if (myProject.isDisposed()) {
throw new RuntimeException("TestDataProvider is already disposed.\n" +
"If you closed a project in test, please reset IdeaTestApplication.setDataProvider.");
}
if (PlatformDataKeys.PROJECT.is(dataId)) {
return myProject;
}