migrate InstrumentationRegistry

This commit is contained in:
olegivo
2020-01-05 11:20:39 +03:00
parent fe732ea385
commit 82486c7514
2 changed files with 5 additions and 2 deletions

View File

@@ -84,8 +84,8 @@ public class BaseAndroidTest extends TestCase
{
if (Looper.myLooper() == null) Looper.prepare();
targetContext = InstrumentationRegistry.getTargetContext();
testContext = InstrumentationRegistry.getContext();
targetContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
testContext = InstrumentationRegistry.getInstrumentation().getContext();
DateUtils.setFixedLocalTime(FIXED_LOCAL_TIME);
setResolution(2.0f);

View File

@@ -31,6 +31,9 @@ import org.isoron.uhabits.core.ui.screens.habits.list.*;
import org.isoron.uhabits.core.utils.*;
import org.junit.*;
import static androidx.test.InstrumentationRegistry.getContext;
import static androidx.test.InstrumentationRegistry.getTargetContext;
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static androidx.test.uiautomator.UiDevice.*;
public class BaseUserInterfaceTest