Search in sources :

Example 16 with ChildControllersRegistry

use of com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry in project react-native-navigation by wix.

the class ViewControllerTest method beforeEach.

@Override
public void beforeEach() {
    super.beforeEach();
    yellowBoxDelegate = Mockito.mock(YellowBoxDelegate.class);
    activity = newActivity();
    childRegistry = new ChildControllersRegistry();
    uut = new SimpleViewController(activity, childRegistry, "uut", new Options());
    mockedParent = Mocks.INSTANCE.parentController(null);
    uut.setParentController(mockedParent);
    Mockito.when(mockedParent.resolveChildOptions(any())).thenReturn(Options.EMPTY);
}
Also used : Options(com.reactnativenavigation.options.Options) ChildControllersRegistry(com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry) SimpleViewController(com.reactnativenavigation.mocks.SimpleViewController)

Example 17 with ChildControllersRegistry

use of com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry in project react-native-navigation by wix.

the class AttachModeTest method beforeEach.

@Override
public void beforeEach() {
    activity = newActivity();
    childRegistry = new ChildControllersRegistry();
    parent = new CoordinatorLayout(activity);
    tabs = createTabs();
    options = new Options();
    options.bottomTabsOptions.currentTabIndex = new Number(INITIAL_TAB);
    presenter = Mockito.mock(BottomTabsPresenter.class);
}
Also used : CoordinatorLayout(androidx.coordinatorlayout.widget.CoordinatorLayout) Options(com.reactnativenavigation.options.Options) Number(com.reactnativenavigation.options.params.Number) BottomTabsPresenter(com.reactnativenavigation.viewcontrollers.bottomtabs.BottomTabsPresenter) ChildControllersRegistry(com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry)

Example 18 with ChildControllersRegistry

use of com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry in project react-native-navigation by wix.

the class LayoutFactoryTest method beforeEach.

@Override
public void beforeEach() {
    super.beforeEach();
    mockReactInstanceManager = mock(ReactInstanceManager.class);
    uut = new LayoutFactory(mockReactInstanceManager);
    uut.init(newActivity(), Mockito.mock(EventEmitter.class), new ChildControllersRegistry(), new HashMap<>());
}
Also used : ReactInstanceManager(com.facebook.react.ReactInstanceManager) EventEmitter(com.reactnativenavigation.react.events.EventEmitter) LayoutFactory(com.reactnativenavigation.options.LayoutFactory) ChildControllersRegistry(com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry)

Example 19 with ChildControllersRegistry

use of com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry in project react-native-navigation by wix.

the class BottomTabPresenterTest method beforeEach.

@Override
public void beforeEach() {
    super.beforeEach();
    activity = newActivity();
    childRegistry = new ChildControllersRegistry();
    createBottomTabs(tab1Options, tab2Options, new Options());
}
Also used : Options(com.reactnativenavigation.options.Options) ChildControllersRegistry(com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry)

Aggregations

ChildControllersRegistry (com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry)19 Options (com.reactnativenavigation.options.Options)16 SimpleViewController (com.reactnativenavigation.mocks.SimpleViewController)9 Presenter (com.reactnativenavigation.viewcontrollers.viewcontroller.Presenter)6 Activity (android.app.Activity)4 FrameLayout (android.widget.FrameLayout)4 EventEmitter (com.reactnativenavigation.react.events.EventEmitter)4 CoordinatorLayout (androidx.coordinatorlayout.widget.CoordinatorLayout)3 ReactInstanceManager (com.facebook.react.ReactInstanceManager)3 Context (android.content.Context)2 View (android.view.View)2 TestComponentLayout (com.reactnativenavigation.mocks.TestComponentLayout)2 TestReactView (com.reactnativenavigation.mocks.TestReactView)2 TypefaceLoaderMock (com.reactnativenavigation.mocks.TypefaceLoaderMock)2 Bool (com.reactnativenavigation.options.params.Bool)2 Text (com.reactnativenavigation.options.params.Text)2 ComponentPresenter (com.reactnativenavigation.viewcontrollers.component.ComponentPresenter)2 ModalStack (com.reactnativenavigation.viewcontrollers.modal.ModalStack)2 OverlayManager (com.reactnativenavigation.viewcontrollers.overlay.OverlayManager)2 TopBarController (com.reactnativenavigation.viewcontrollers.stack.topbar.TopBarController)2