use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class BottomTabPresenterTest method createTab2Options.
private Options createTab2Options() {
Options options = new Options();
options.bottomTabOptions.badge = new Text("tab2badge");
options.bottomTabOptions.iconColor = new ThemeColour(new Colour(Color.RED));
options.bottomTabOptions.selectedIconColor = new ThemeColour(new Colour(Color.RED));
return options;
}
use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class ExternalComponentViewControllerTest method beforeEach.
@Override
public void beforeEach() {
componentCreator = spy(new FragmentCreatorMock());
activity = newActivity();
ec = createExternalComponent();
reactInstanceManager = Mockito.mock(ReactInstanceManager.class);
emitter = Mockito.mock(EventEmitter.class);
childRegistry = new ChildControllersRegistry();
uut = spy(new ExternalComponentViewController(activity, childRegistry, "fragmentId", new Presenter(activity, Options.EMPTY), ec, componentCreator, reactInstanceManager, emitter, new ExternalComponentPresenter(), new Options()));
}
use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class ModalPresenterTest method showModal_resolvesDefaultOptions.
@Test
public void showModal_resolvesDefaultOptions() throws JSONException {
Options defaultOptions = new Options();
JSONObject disabledShowModalAnimation = TransitionAnimationOptionsTestKt.newModalAnimationJson(false);
defaultOptions.animations.showModal = TransitionAnimationOptionsKt.parseTransitionAnimationOptions(disabledShowModalAnimation);
uut.setDefaultOptions(defaultOptions);
uut.showModal(modal1, root, new CommandListenerAdapter());
verifyNoInteractions(animator);
}
use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class OptionHelper method createBottomTabOptions.
public static Options createBottomTabOptions() {
Options options = new Options();
options.topBar.buttons.left = new ArrayList<>();
options.bottomTabOptions.text = new Text("Tab");
options.bottomTabOptions.icon = new Text("http://127.0.0.1/icon.png");
return options;
}
use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class BottomTabPresenterTest method mergeChildOptions_nullColorsAreNotMerged.
@Test
public void mergeChildOptions_nullColorsAreNotMerged() {
Options options = new Options();
options.bottomTabOptions.iconColor = new ThemeColour(new DontApplyColour());
options.bottomTabOptions.selectedIconColor = new ThemeColour(new DontApplyColour());
uut.mergeChildOptions(options, child3);
verify(bottomTabs, times(0)).setIconActiveColor(anyInt(), anyInt());
verify(bottomTabs, times(0)).setIconInactiveColor(anyInt(), anyInt());
}
Aggregations