Skip to content

Commit 07746d8

Browse files
committed
Upgrade tests
1 parent e230393 commit 07746d8

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ android {
1616
compileSdkVersion 34
1717
defaultConfig {
1818
applicationId "com.talkable.demo"
19-
minSdkVersion 16
19+
minSdkVersion 19
2020
targetSdkVersion 34
2121
versionCode 34
2222
versionName "0.5.3"
@@ -39,6 +39,6 @@ dependencies {
3939
implementation fileTree(include: ['*.jar'], dir: 'libs')
4040
implementation project(path: ':sdk')
4141
implementation 'com.google.android.material:material:1.0.0'
42-
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
43-
testImplementation 'junit:junit:4.12'
42+
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
43+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
4444
}
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
package com.talkable.demo;
22

33
import android.app.Application;
4-
import android.test.ApplicationTestCase;
4+
import androidx.test.core.app.ApplicationProvider;
5+
import org.junit.Test;
6+
import static org.junit.Assert.*;
57

68
/**
7-
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
9+
* <a href="https://developer.android.com/studio/test">Testing Fundamentals</a>
810
*/
9-
public class ApplicationTest extends ApplicationTestCase<Application> {
10-
public ApplicationTest() {
11-
super(Application.class);
11+
12+
public class ApplicationTest {
13+
@Test
14+
public void testApplication() {
15+
// Getting the application context using AndroidX ApplicationProvider
16+
Application app = ApplicationProvider.getApplicationContext();
17+
assertNotNull(app); // Assert that the Application context is not null
1218
}
1319
}

0 commit comments

Comments
 (0)