|
@@ -71,7 +71,7 @@ public class NavigatorTest extends BaseTest {
|
71
|
71
|
public void beforeEach() {
|
72
|
72
|
childRegistry = new ChildControllersRegistry();
|
73
|
73
|
eventEmitter = Mockito.mock(EventEmitter.class);
|
74
|
|
- overlayManager = Mockito.mock(OverlayManager.class);
|
|
74
|
+ overlayManager = spy(new OverlayManager());
|
75
|
75
|
imageLoaderMock = ImageLoaderMock.mock();
|
76
|
76
|
activityController = newActivityController(TestActivity.class);
|
77
|
77
|
activity = activityController.create().get();
|
|
@@ -349,6 +349,24 @@ public class NavigatorTest extends BaseTest {
|
349
|
349
|
return new BottomTabsController(activity, tabs, childRegistry, eventEmitter, imageLoaderMock, "tabsController", new Options(), new Presenter(activity, new Options()), new BottomTabsPresenter(tabs, new Options()), new BottomTabPresenter(activity, tabs, ImageLoaderMock.mock(), new Options()));
|
350
|
350
|
}
|
351
|
351
|
|
|
352
|
+ @Test
|
|
353
|
+ public void findController_root() {
|
|
354
|
+ uut.setRoot(child1, new CommandListenerAdapter());
|
|
355
|
+ assertThat(uut.findController(child1.getId())).isEqualTo(child1);
|
|
356
|
+ }
|
|
357
|
+
|
|
358
|
+ @Test
|
|
359
|
+ public void findController_overlay() {
|
|
360
|
+ uut.showOverlay(child1, new CommandListenerAdapter());
|
|
361
|
+ assertThat(uut.findController(child1.getId())).isEqualTo(child1);
|
|
362
|
+ }
|
|
363
|
+
|
|
364
|
+ @Test
|
|
365
|
+ public void findController_modal() {
|
|
366
|
+ uut.showModal(child1, new CommandListenerAdapter());
|
|
367
|
+ assertThat(uut.findController(child1.getId())).isEqualTo(child1);
|
|
368
|
+ }
|
|
369
|
+
|
352
|
370
|
@NonNull
|
353
|
371
|
private StackController newStack() {
|
354
|
372
|
StackController stack = TestUtils.newStackController(activity)
|
|
@@ -588,7 +606,7 @@ public class NavigatorTest extends BaseTest {
|
588
|
606
|
public void destroy_destroyOverlayManager() {
|
589
|
607
|
uut.setRoot(parentController, new CommandListenerAdapter());
|
590
|
608
|
activityController.destroy();
|
591
|
|
- verify(overlayManager, times(1)).destroy();
|
|
609
|
+ verify(overlayManager).destroy();
|
592
|
610
|
}
|
593
|
611
|
|
594
|
612
|
@Test
|