Преглед на файлове

android: splash view unit test

Daniel Zlotin преди 7 години
родител
ревизия
e678afb321
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3
    1
      android/app/src/test/java/com/reactnativenavigation/NavigationActivityTest.java

+ 3
- 1
android/app/src/test/java/com/reactnativenavigation/NavigationActivityTest.java Целия файл

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