Browse Source

fixing mockito version and start of espresso native e2e

Daniel Zlotin 7 years ago
parent
commit
44fc48cdaa

+ 3
- 3
android/app/build.gradle View File

60
     testCompile 'junit:junit:4.12'
60
     testCompile 'junit:junit:4.12'
61
     testCompile 'org.robolectric:robolectric:3.2.2'
61
     testCompile 'org.robolectric:robolectric:3.2.2'
62
     testCompile 'org.assertj:assertj-core:2.5.0'
62
     testCompile 'org.assertj:assertj-core:2.5.0'
63
-    // required for robolectric
64
-    testCompile 'org.khronos:opengl-api:gl1.1-android-2.1_r1'
63
+    testCompile 'org.mockito:mockito-core:2.7.5'
65
 
64
 
66
-    testCompile 'org.mockito:mockito-core:2.+'
65
+    // native e2e
66
+    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
67
 }
67
 }

+ 12
- 0
android/app/src/test/java/com/reactnativenavigation/ApplicationTest.java View File

1
+package com.reactnativenavigation;
2
+
3
+import org.junit.Test;
4
+
5
+import static org.assertj.core.api.Java6Assertions.assertThat;
6
+
7
+public class ApplicationTest {
8
+    @Test
9
+    public void startingActivity() {
10
+        assertThat(1+2).isNotZero();
11
+    }
12
+}

+ 1
- 0
android/prepare-robolectric.gradle View File

3
 configurations.create('robolectricRuntime')
3
 configurations.create('robolectricRuntime')
4
 
4
 
5
 dependencies {
5
 dependencies {
6
+    testCompile "org.khronos:opengl-api:gl1.1-android-2.1_r1"
6
     robolectricRuntime "org.robolectric:android-all:6.0.1_r3-robolectric-0"
7
     robolectricRuntime "org.robolectric:android-all:6.0.1_r3-robolectric-0"
7
     robolectricRuntime "org.robolectric:shadows-core:3.2.2"
8
     robolectricRuntime "org.robolectric:shadows-core:3.2.2"
8
 }
9
 }