Skip to content

Commit

Permalink
chore: Updated tests implementation to stop crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
itachi1706 committed Jun 13, 2024
1 parent 57293f2 commit aee8bc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,9 @@ dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.1'
androidTestImplementation 'androidx.test:core:1.5.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'org.junit.jupiter:junit-jupiter:5.9.1'
androidTestImplementation('androidx.test.espresso:espresso-core:3.5.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test:rules:1.5.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

implementation fileTree(dir: 'libs', include: ['*.jar'])
// Import the BoM for the Firebase platform
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;

import org.junit.jupiter.api.Test;
import org.junit.Test;
import org.junit.runner.RunWith;

/**
Expand All @@ -16,9 +16,9 @@
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
class ExampleInstrumentedTest {
public class ExampleInstrumentedTest {
@Test
void useAppContext() {
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

Expand Down

0 comments on commit aee8bc5

Please sign in to comment.