use of com.reactnativenavigation.viewcontrollers.stack.topbar.button.IconResolver 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.viewcontrollers.stack.topbar.button.IconResolver in project react-native-navigation by wix.
the class TitleBarButtonControllerTest method beforeEach.
@Override
public void beforeEach() {
Activity activity = newActivity();
titleBar = new ButtonBar(activity);
ButtonOptions button = createComponentButton();
uut = new ButtonController(activity, new ButtonPresenter(activity, button, new IconResolver(activity, ImageLoaderMock.mock())), button, new TitleBarButtonCreatorMock(), Mockito.mock(ButtonController.OnClickListener.class));
}
use of com.reactnativenavigation.viewcontrollers.stack.topbar.button.IconResolver in project react-native-navigation by wix.
the class NavigationIconResolverTest method beforeEach.
@Override
public void beforeEach() {
imageLoader = ImageLoaderMock.mock();
context = newActivity();
uut = new IconResolver(context, imageLoader);
}
Aggregations