mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
testDataProvider - assertion
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user