@Test public void push_rejectIfNotContainedInStack() { CommandListener listener = Mockito.mock(CommandListener.class); uut.push("someId", child1, listener); verify(listener).onError(any()); }
public void push(final String id, final ViewController viewController, CommandListener listener) { applyOnStack(id, listener, stack -> stack.push(viewController, listener)); }
Navigator extends ParentController { public void push(final String id, final ViewController viewController, CommandListener listener) { applyOnStack(id, listener, stack -> stack.push(viewController, listener)); } }
Navigator extends ParentController { public void push(final String id, final ViewController viewController, CommandListener listener) { applyOnStack(id, listener, stack -> stack.push(viewController, listener)); } Navigator(final Activity activity, ChildControllersRegistry childRegistry, ModalStack modalStack, OverlayManager overlayManager, RootPresenter rootPresenter); }
Navigator extends ParentController { public void push(final String id, final ViewController viewController, CommandListener listener) { applyOnStack(id, listener, stack -> stack.push(viewController, listener)); } Navigator(final Activity activity, ChildControllersRegistry childRegistry, ModalStack modalStack, OverlayManager overlayManager, RootPresenter rootPresenter); @Override void setDefaultOptions(Options defaultOptions); Options getDefaultOptions(); FrameLayout getRootLayout(); void setEventEmitter(EventEmitter eventEmitter); void setContentLayout(ViewGroup contentLayout); void bindViews(); @NonNull @Override Collection<ViewController> getChildControllers(); @Override boolean handleBack(CommandListener listener); @Override void destroy(); void destroyViews(); @Override void sendOnNavigationButtonPressed(String buttonId); void setRoot(final ViewController viewController, CommandListener commandListener); void mergeOptions(final String componentId, Options options); void push(final String id, final ViewController viewController, CommandListener listener); void setStackRoot(String id, ViewController viewController, CommandListener listener); void pop(String id, Options mergeOptions, CommandListener listener); void popToRoot(final String id, Options mergeOptions, CommandListener listener); void popTo(final String id, Options mergeOptions, CommandListener listener); void showModal(final ViewController viewController, CommandListener listener); void dismissModal(final String componentId, CommandListener listener); void dismissAllModals(Options mergeOptions, CommandListener listener); void showOverlay(ViewController overlay, CommandListener listener); void dismissOverlay(final String componentId, CommandListener listener); @Nullable @Override ViewController findController(String id); }
Navigator extends ParentController { public void push(final String id, final ViewController viewController, CommandListener listener) { applyOnStack(id, listener, stack -> stack.push(viewController, listener)); } Navigator(final Activity activity, ChildControllersRegistry childRegistry, ModalStack modalStack, OverlayManager overlayManager, RootPresenter rootPresenter); @Override void setDefaultOptions(Options defaultOptions); Options getDefaultOptions(); FrameLayout getRootLayout(); void setEventEmitter(EventEmitter eventEmitter); void setContentLayout(ViewGroup contentLayout); void bindViews(); @NonNull @Override Collection<ViewController> getChildControllers(); @Override boolean handleBack(CommandListener listener); @Override void destroy(); void destroyViews(); @Override void sendOnNavigationButtonPressed(String buttonId); void setRoot(final ViewController viewController, CommandListener commandListener); void mergeOptions(final String componentId, Options options); void push(final String id, final ViewController viewController, CommandListener listener); void setStackRoot(String id, ViewController viewController, CommandListener listener); void pop(String id, Options mergeOptions, CommandListener listener); void popToRoot(final String id, Options mergeOptions, CommandListener listener); void popTo(final String id, Options mergeOptions, CommandListener listener); void showModal(final ViewController viewController, CommandListener listener); void dismissModal(final String componentId, CommandListener listener); void dismissAllModals(Options mergeOptions, CommandListener listener); void showOverlay(ViewController overlay, CommandListener listener); void dismissOverlay(final String componentId, CommandListener listener); @Nullable @Override ViewController findController(String id);  }