mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
migrate InstrumentationRegistry
This commit is contained in:
@@ -84,8 +84,8 @@ public class BaseAndroidTest extends TestCase
|
|||||||
{
|
{
|
||||||
if (Looper.myLooper() == null) Looper.prepare();
|
if (Looper.myLooper() == null) Looper.prepare();
|
||||||
|
|
||||||
targetContext = InstrumentationRegistry.getTargetContext();
|
targetContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||||
testContext = InstrumentationRegistry.getContext();
|
testContext = InstrumentationRegistry.getInstrumentation().getContext();
|
||||||
|
|
||||||
DateUtils.setFixedLocalTime(FIXED_LOCAL_TIME);
|
DateUtils.setFixedLocalTime(FIXED_LOCAL_TIME);
|
||||||
setResolution(2.0f);
|
setResolution(2.0f);
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ import org.isoron.uhabits.core.ui.screens.habits.list.*;
|
|||||||
import org.isoron.uhabits.core.utils.*;
|
import org.isoron.uhabits.core.utils.*;
|
||||||
import org.junit.*;
|
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.*;
|
import static androidx.test.uiautomator.UiDevice.*;
|
||||||
|
|
||||||
public class BaseUserInterfaceTest
|
public class BaseUserInterfaceTest
|
||||||
|
|||||||
Reference in New Issue
Block a user