use of com.reactnativenavigation.options.params.ThemeColour in project react-native-navigation by wix.
the class NavigationIconResolverTest method iconButton.
private ButtonOptions iconButton() {
ButtonOptions button = new ButtonOptions();
button.id = "iconBtnId";
button.icon = new Text(ICON_URI);
button.color = new ThemeColour(new Colour(Color.RED));
return button;
}
use of com.reactnativenavigation.options.params.ThemeColour in project react-native-navigation by wix.
the class OptionsApplyingTest method appliesTopBackBackgroundColor.
@Test
public void appliesTopBackBackgroundColor() {
uut.options.topBar.background.color = new ThemeColour(new Colour(Color.RED));
stack.push(uut, new CommandListenerAdapter());
idleMainLooper();
assertThat(((ColorDrawable) stack.getTopBar().getBackground()).getColor()).isEqualTo(Color.RED);
}
use of com.reactnativenavigation.options.params.ThemeColour in project react-native-navigation by wix.
the class BottomTabPresenterTest method mergeOptions_createTabsOnce.
@Test
public void mergeOptions_createTabsOnce() {
Options options = new Options();
options.bottomTabOptions.iconColor = new ThemeColour(new Colour(1));
options.bottomTabOptions.selectedIconColor = new ThemeColour(new Colour(1));
BottomTabPresenter spy = spy(uut);
spy.mergeOptions(options);
InOrder inOrder = inOrder(spy, child1, child2, child3, bottomTabs);
inOrder.verify(bottomTabs).disableItemsCreation();
forEach(tabs, tab -> inOrder.verify(spy).mergeChildOptions(options, tab));
inOrder.verify(bottomTabs).enableItemsCreation();
}
Aggregations