|
@@ -3,6 +3,7 @@ package com.reactnativenavigation.viewcontrollers;
|
3
|
3
|
import android.app.Activity;
|
4
|
4
|
import android.support.annotation.NonNull;
|
5
|
5
|
import android.view.View;
|
|
6
|
+import android.view.ViewGroup;
|
6
|
7
|
import android.widget.FrameLayout;
|
7
|
8
|
|
8
|
9
|
import com.reactnativenavigation.BaseTest;
|
|
@@ -26,6 +27,23 @@ public class ParentControllerTest extends BaseTest {
|
26
|
27
|
activity = newActivity();
|
27
|
28
|
}
|
28
|
29
|
|
|
30
|
+ @Test
|
|
31
|
+ public void holdsViewGroup() throws Exception {
|
|
32
|
+ ParentController uut = new ParentController(activity, "uut") {
|
|
33
|
+ @Override
|
|
34
|
+ public Collection<ViewController> getChildControllers() {
|
|
35
|
+ return Collections.emptyList();
|
|
36
|
+ }
|
|
37
|
+
|
|
38
|
+ @NonNull
|
|
39
|
+ @Override
|
|
40
|
+ protected View createView() {
|
|
41
|
+ return new FrameLayout(activity);
|
|
42
|
+ }
|
|
43
|
+ };
|
|
44
|
+
|
|
45
|
+ assertThat(uut.getView()).isInstanceOf(ViewGroup.class);
|
|
46
|
+ }
|
29
|
47
|
|
30
|
48
|
@Test
|
31
|
49
|
public void findControllerById_ReturnsSelfIfSameId() throws Exception {
|