|
@@ -0,0 +1,27 @@
|
|
1
|
+package com.reactnativenavigation;
|
|
2
|
+
|
|
3
|
+import com.facebook.react.ReactApplication;
|
|
4
|
+
|
|
5
|
+import org.junit.Test;
|
|
6
|
+import org.robolectric.RuntimeEnvironment;
|
|
7
|
+
|
|
8
|
+import static org.assertj.core.api.Java6Assertions.assertThat;
|
|
9
|
+
|
|
10
|
+public class NavigationApplicationTest extends BaseTest {
|
|
11
|
+
|
|
12
|
+ @Test
|
|
13
|
+ public void reactApplication() throws Exception {
|
|
14
|
+ assertThat(RuntimeEnvironment.application).isInstanceOf(ReactApplication.class);
|
|
15
|
+ assertThat(((ReactApplication) RuntimeEnvironment.application).getReactNativeHost()).isNotNull();
|
|
16
|
+ }
|
|
17
|
+
|
|
18
|
+ @Test
|
|
19
|
+ public void isDebug() throws Exception {
|
|
20
|
+ assertThat(((NavigationApplication) RuntimeEnvironment.application).isDebug()).isTrue();
|
|
21
|
+ }
|
|
22
|
+
|
|
23
|
+ @Test
|
|
24
|
+ public void singleInstance() throws Exception {
|
|
25
|
+ assertThat(RuntimeEnvironment.application).isSameAs(NavigationApplication.instance);
|
|
26
|
+ }
|
|
27
|
+}
|