use of com.reactnativenavigation.viewcontrollers.stack.topbar.button.ButtonPresenter in project react-native-navigation by wix.
the class ButtonPresenterTest method initUUt.
private void initUUt(ImageLoader imageLoaderMock) {
IconResolverFake iconResolver = new IconResolverFake(activity, imageLoaderMock);
uut = new ButtonPresenter(activity, button, iconResolver);
buttonController = new ButtonController(activity, uut, button, mock(TitleBarButtonCreator.class), mock(ButtonController.OnClickListener.class));
}
use of com.reactnativenavigation.viewcontrollers.stack.topbar.button.ButtonPresenter in project react-native-navigation by wix.
the class StackPresenter method createButtonController.
private ButtonController createButtonController(ButtonOptions button) {
ButtonController controller = new ButtonController(activity, new ButtonPresenter(activity, button, iconResolver), button, buttonCreator, onClickListener);
controller.setWaitForRender(button.component.waitForRender);
return controller;
}
use of com.reactnativenavigation.viewcontrollers.stack.topbar.button.ButtonPresenter 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.ButtonPresenter in project react-native-navigation by wix.
the class TopBarButtonControllerTest method beforeEach.
@Override
public void beforeEach() {
button = new ButtonOptions();
final Activity activity = newActivity();
TitleBarButtonCreatorMock buttonCreatorMock = new TitleBarButtonCreatorMock();
stackController = spy(TestUtils.newStackController(activity).build());
stackController.getView().layout(0, 0, 1080, 1920);
stackController.getTopBar().layout(0, 0, 1080, 200);
getTitleBar().layout(0, 0, 1080, 200);
optionsPresenter = spy(new ButtonPresenter(activity, button, new IconResolverFake(activity, ImageLoaderMock.mock())));
uut = new ButtonController(activity, optionsPresenter, button, buttonCreatorMock, (buttonId) -> {
});
stackController.ensureViewIsCreated();
}
Aggregations