File tree 2 files changed +14
-8
lines changed
src/androidTest/java/com/talkable/demo 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ android {
16
16
compileSdkVersion 34
17
17
defaultConfig {
18
18
applicationId " com.talkable.demo"
19
- minSdkVersion 16
19
+ minSdkVersion 19
20
20
targetSdkVersion 34
21
21
versionCode 34
22
22
versionName " 0.5.3"
@@ -39,6 +39,6 @@ dependencies {
39
39
implementation fileTree(include : [' *.jar' ], dir : ' libs' )
40
40
implementation project(path : ' :sdk' )
41
41
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 '
44
44
}
Original file line number Diff line number Diff line change 1
1
package com .talkable .demo ;
2
2
3
3
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 .*;
5
7
6
8
/**
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>
8
10
*/
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
12
18
}
13
19
}
You can’t perform that action at this time.
0 commit comments