mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Add ability to provide name on MockModule for testing
Used by Android Plugin tests (as of Android Studio 2.3)
This commit is contained in:
@@ -28,6 +28,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public class MockModule extends MockComponentManager implements Module {
|
||||
private final Project myProject;
|
||||
private String myName = "MockModule";
|
||||
|
||||
public MockModule(@NotNull Disposable parentDisposable) {
|
||||
this(null, parentDisposable);
|
||||
@@ -114,7 +115,12 @@ public class MockModule extends MockComponentManager implements Module {
|
||||
@Override
|
||||
@NotNull
|
||||
public String getName() {
|
||||
return "MockModule";
|
||||
return myName;
|
||||
}
|
||||
|
||||
public MockModule setName(String name) {
|
||||
myName = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user