Destroy state and environment in android test
This commit is contained in:
+14
-10
@@ -62,16 +62,7 @@ public abstract class KtUsefulTestCase extends TestCase {
|
||||
private Application application;
|
||||
|
||||
@NotNull
|
||||
protected final Disposable myTestRootDisposable = new Disposable() {
|
||||
@Override
|
||||
public void dispose() { }
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String testName = getTestName(false);
|
||||
return KtUsefulTestCase.this.getClass() + (StringUtil.isEmpty(testName) ? "" : ".test" + testName);
|
||||
}
|
||||
};
|
||||
protected final Disposable myTestRootDisposable = new TestDisposable();
|
||||
|
||||
private static final String ourPathToKeep = null;
|
||||
private final List<String> myPathsToKeep = new ArrayList<>();
|
||||
@@ -481,4 +472,17 @@ public abstract class KtUsefulTestCase extends TestCase {
|
||||
private static boolean containsStressWords(@Nullable String name) {
|
||||
return name != null && (name.contains("Stress") || name.contains("Slow"));
|
||||
}
|
||||
|
||||
|
||||
public class TestDisposable implements Disposable {
|
||||
@Override
|
||||
public void dispose() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String testName = getTestName(false);
|
||||
return KtUsefulTestCase.this.getClass() + (StringUtil.isEmpty(testName) ? "" : ".test" + testName);
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user