use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.
the class TitleBarReactViewControllerTest method createComponent.
private ComponentOptions createComponent() {
ComponentOptions component = new ComponentOptions();
component.componentId = new Text("compId");
component.name = new Text("compName");
return component;
}
use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.
the class ParentControllerTest method mergeOptions_initialParentOptionsAreNotMutatedWhenChildAppears.
@Test
public void mergeOptions_initialParentOptionsAreNotMutatedWhenChildAppears() {
Options options = new Options();
options.topBar.title.text = new Text("new title");
ViewController<?> child1 = spy(new SimpleViewController(activity, childRegistry, "child1", options));
children.add(child1);
uut.ensureViewIsCreated();
child1.ensureViewIsCreated();
child1.onViewWillAppear();
assertThat(uut.initialOptions.topBar.title.text.get()).isEqualTo(INITIAL_TITLE);
}
use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.
the class TopBarButtonControllerTest method setIconButton.
private void setIconButton(boolean enabled) {
button.id = "btn1";
button.icon = new Text("someIcon");
button.color = new ThemeColour(new Colour(Color.RED), new Colour(Color.RED));
button.component.name = new NullText();
button.component.componentId = new NullText();
button.enabled = new Bool(enabled);
button.showAsAction = new Number(MenuItem.SHOW_AS_ACTION_ALWAYS);
}
use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.
the class SideMenuControllerTest method resolveCurrentOptions_centerOptionsAreMergedEvenIfDrawerIsOpen.
@Test
public void resolveCurrentOptions_centerOptionsAreMergedEvenIfDrawerIsOpen() {
uut.setLeftController(left);
center.options.topBar.title.text = new Text("Center");
assertThat(uut.resolveCurrentOptions().topBar.title.text.hasValue()).isTrue();
openLeftMenu();
assertThat(uut.resolveCurrentOptions().topBar.title.text.hasValue()).isTrue();
}
use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.
the class FloatingActionButtonTest method getOptionsWithFab.
@NonNull
private Options getOptionsWithFab() {
Options options = new Options();
FabOptions fabOptions = new FabOptions();
fabOptions.id = new Text("FAB");
options.fabOptions = fabOptions;
return options;
}
Aggregations