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:
Jeffrey van Gogh
2016-11-08 16:11:42 -08:00
parent 026a4b9a2f
commit 41c815b1e2
@@ -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