From fa25f18453c05e1907b425b11edf4802a6448754 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 20 Apr 2020 19:32:03 +0300 Subject: initial --- .../org/fox/epube/ExampleInstrumentedTest.java | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 org.fox.epube/src/androidTest/java/org/fox/epube/ExampleInstrumentedTest.java (limited to 'org.fox.epube/src/androidTest') diff --git a/org.fox.epube/src/androidTest/java/org/fox/epube/ExampleInstrumentedTest.java b/org.fox.epube/src/androidTest/java/org/fox/epube/ExampleInstrumentedTest.java new file mode 100644 index 0000000..170d665 --- /dev/null +++ b/org.fox.epube/src/androidTest/java/org/fox/epube/ExampleInstrumentedTest.java @@ -0,0 +1,27 @@ +package org.fox.epube; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + + assertEquals("org.fox.epube", appContext.getPackageName()); + } +} -- cgit v1.2.3