use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.
the class ParentControllerTest method beforeEach.
@Override
public void beforeEach() {
super.beforeEach();
activity = newActivity();
childRegistry = new ChildControllersRegistry();
children = new ArrayList<>();
Options initialOptions = new Options();
initialOptions.topBar.title.text = new Text(INITIAL_TITLE);
presenter = spy(new Presenter(activity, new Options()));
uut = spy(new ParentController<ViewGroup>(activity, childRegistry, "uut", presenter, initialOptions) {
@Override
public ViewController<?> getCurrentChild() {
return children.get(0);
}
@NonNull
@Override
public ViewGroup createView() {
FrameLayout layout = new FrameLayout(activity);
for (ViewController<?> child : children) {
child.setParentController(this);
layout.addView(child.getView());
}
return layout;
}
@Override
public void sendOnNavigationButtonPressed(String buttonId) {
}
@NonNull
@Override
public Collection<ViewController<?>> getChildControllers() {
return children;
}
});
}
use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.
the class TopTabsViewControllerTest method createOptions.
@NonNull
private ArrayList<Options> createOptions() {
ArrayList<Options> result = new ArrayList<>();
for (int i = 0; i < SIZE; i++) {
final Options options = new Options();
options.topTabOptions.title = new Text("Tab " + i);
options.topBar.title.text = new Text(createTabTopBarTitle(i));
result.add(options);
}
return result;
}
use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.
the class ButtonPresenterTest method createButton.
private ButtonOptions createButton() {
ButtonOptions b = new ButtonOptions();
b.id = "btn1";
b.text = new Text(BTN_TEXT);
b.showAsAction = new Number(MenuItem.SHOW_AS_ACTION_ALWAYS);
return b;
}
use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.
the class OptionsTest method clear_topBarOptions.
@Test
public void clear_topBarOptions() {
Options uut = new Options();
uut.topBar.title.text = new Text("some title");
uut.clearTopBarOptions();
assertThat(uut.topBar.title.text.hasValue()).isFalse();
}
use of com.reactnativenavigation.options.params.Text in project react-native-navigation by wix.
the class FloatingActionButtonTest method getOptionsWithFabActions.
@NonNull
private Options getOptionsWithFabActions() {
Options options = new Options();
FabOptions fabOptions = new FabOptions();
fabOptions.id = new Text("FAB");
for (int i = 0; i < CHILD_FAB_COUNT; i++) {
FabOptions childOptions = new FabOptions();
childOptions.id = new Text("fab" + i);
fabOptions.actionsArray.add(childOptions);
}
options.fabOptions = fabOptions;
return options;
}
Aggregations