Skip to content

Commit efc4515

Browse files
committed
fix: fix test compile error
1 parent a9a155f commit efc4515

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib_fileviewer/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ android {
2525
dependencies {
2626
// implementation fileTree(include: ['*.jar'], dir: 'libs')
2727
implementation 'androidx.appcompat:appcompat:1.0.0'
28-
testImplementation 'junit:junit:4.12'
28+
testImplementation 'junit:junit:4.13.2'
2929
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
3030
exclude group: 'com.android.support', module: 'support-annotations'
3131
})

lib_fileviewer/src/androidTest/java/com/artifex/mupdf/fitz/ExampleInstrumentedTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import android.content.Context;
44
import androidx.test.platform.app.InstrumentationRegistry;
5-
import androidx.test.ext.junit.runners.AndroidJUnit4;
5+
import androidx.test.runner.AndroidJUnit4;
66

77
import org.junit.Test;
88
import org.junit.runner.RunWith;
@@ -19,7 +19,7 @@ public class ExampleInstrumentedTest {
1919
@Test
2020
public void useAppContext() throws Exception {
2121
// Context of the app under test.
22-
Context appContext = InstrumentationRegistry.getTargetContext();
22+
Context appContext = InstrumentationRegistry.getInstrumentation().getContext();
2323

2424
assertEquals("com.artifex.mupdf.fitz.test", appContext.getPackageName());
2525
}

0 commit comments

Comments
 (0)