use of com.reactnativenavigation.mocks.TypefaceLoaderMock in project react-native-navigation by wix.
the class ButtonSpanTest method beforeEach.
@Override
public void beforeEach() {
button = createButton();
activity = newActivity();
uut = new ButtonSpan(activity, button, new TypefaceLoaderMock());
}
use of com.reactnativenavigation.mocks.TypefaceLoaderMock in project react-native-navigation by wix.
the class BottomTabPresenterTest method createBottomTabs.
private void createBottomTabs(Options tab1Options, Options tab2Options, Options tab3Options) {
childRegistry = new ChildControllersRegistry();
bottomTabs = Mockito.mock(BottomTabs.class);
child1 = spy(new SimpleViewController(activity, childRegistry, "child1", tab1Options));
child2 = spy(new SimpleViewController(activity, childRegistry, "child2", tab2Options));
child3 = spy(new SimpleViewController(activity, childRegistry, "child2", tab3Options));
tabs = Arrays.asList(child1, child2, child3);
uut = new BottomTabPresenter(activity, tabs, ImageLoaderMock.mock(), new TypefaceLoaderMock(), new Options());
uut.bindView(bottomTabs);
uut.setDefaultOptions(new Options());
}
use of com.reactnativenavigation.mocks.TypefaceLoaderMock 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());
}
Aggregations