use of com.reactnativenavigation.options.params.NullText in project react-native-navigation by wix.
the class Options method clearOneTimeOptions.
public Options clearOneTimeOptions() {
bottomTabsOptions.currentTabId = new NullText();
bottomTabsOptions.currentTabIndex = new NullNumber();
return this;
}
use of com.reactnativenavigation.options.params.NullText in project react-native-navigation by wix.
the class BottomTabPresenterTest method applyOptions_shouldPresentBadgeIfAvailable.
@Test
public void applyOptions_shouldPresentBadgeIfAvailable() {
final Options tab1 = tab1Options.copy();
tab1.bottomTabOptions.badge = new NullText();
tab1.bottomTabOptions.badgeColor = new NullThemeColour();
final Options tab2 = tab2Options.copy();
tab2.bottomTabOptions.badge = new Text("Badge");
tab2.bottomTabOptions.badgeColor = ThemeColour.of(Color.RED);
createBottomTabs(tab1, tab2, new Options());
uut.applyOptions();
ArgumentCaptor<AHNotification> notificationArgumentCaptor = ArgumentCaptor.forClass(AHNotification.class);
verify(bottomTabs).setNotification(notificationArgumentCaptor.capture(), eq(1));
final AHNotification value = notificationArgumentCaptor.getValue();
assertThat(value.getReadableText()).isEqualTo("Badge");
assertThat(value.getBackgroundColor()).isEqualTo(Color.RED);
verify(bottomTabs, never()).setNotification(notificationArgumentCaptor.capture(), eq(0));
verify(bottomTabs, never()).setNotification(notificationArgumentCaptor.capture(), eq(2));
}
Aggregations