use of com.reactnativenavigation.mocks.TitleBarReactViewCreatorMock in project react-native-navigation by wix.
the class TestUtils method newStackController.
public static StackControllerBuilder newStackController(Activity activity) {
TopBarController topBarController = new TopBarController() {
@Override
protected TopBar createTopBar(@NonNull Context context, @NonNull StackLayout stackLayout) {
TopBar topBar = super.createTopBar(context, stackLayout);
topBar.layout(0, 0, 1000, UiUtils.getTopBarHeight(context));
return topBar;
}
};
return new StackControllerBuilder(activity, Mockito.mock(EventEmitter.class)).setId("stack" + CompatUtils.generateViewId()).setChildRegistry(new ChildControllersRegistry()).setTopBarController(topBarController).setStackPresenter(new StackPresenter(activity, new TitleBarReactViewCreatorMock(), new TopBarBackgroundViewCreatorMock(), new TitleBarButtonCreatorMock(), new IconResolver(activity, new ImageLoader()), new TypefaceLoaderMock(), new RenderChecker(), new Options())).setInitialOptions(new Options());
}
use of com.reactnativenavigation.mocks.TitleBarReactViewCreatorMock in project react-native-navigation by wix.
the class TitleBarReactViewControllerTest method beforeEach.
@Override
public void beforeEach() {
viewCreator = spy(new TitleBarReactViewCreatorMock());
activity = newActivity();
component = createComponent();
uut = new TitleBarReactViewController(activity, viewCreator, component);
}
Aggregations