Browse Source

android: splash view unit test

Daniel Zlotin 7 years ago
parent
commit
e678afb321

+ 3
- 1
android/app/src/test/java/com/reactnativenavigation/NavigationActivityTest.java View File

1
 package com.reactnativenavigation;
1
 package com.reactnativenavigation;
2
 
2
 
3
+import com.reactnativenavigation.views.NavigationSplashView;
4
+
3
 import org.junit.Test;
5
 import org.junit.Test;
4
 import org.robolectric.Robolectric;
6
 import org.robolectric.Robolectric;
5
 
7
 
9
     @Test
11
     @Test
10
     public void showsSplashView() throws Exception {
12
     public void showsSplashView() throws Exception {
11
         NavigationActivity activity = Robolectric.setupActivity(NavigationActivity.class);
13
         NavigationActivity activity = Robolectric.setupActivity(NavigationActivity.class);
12
-        assertThat(activity).isNotNull();
14
+        assertThat(activity.getContentView()).isInstanceOf(NavigationSplashView.class);
13
     }
15
     }
14
 }
16
 }