use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class SideMenuControllerTest method mergeOptions_openRightSideMenu.
@Test
public void mergeOptions_openRightSideMenu() {
uut.setRightController(new SimpleComponentViewController(activity, childRegistry, "right", new Options()));
Options options = new Options();
options.sideMenuRootOptions.right.visible = new Bool(true);
assertThat(uut.getView().isDrawerOpen(Gravity.RIGHT)).isFalse();
uut.mergeOptions(options);
assertThat(uut.getView().isDrawerOpen(Gravity.RIGHT)).isTrue();
}
use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class SideMenuControllerTest method mergeOptions_openLeftSideMenu.
@Test
public void mergeOptions_openLeftSideMenu() {
uut.setLeftController(new SimpleComponentViewController(activity, childRegistry, "left", new Options()));
Options options = new Options();
options.sideMenuRootOptions.left.visible = new Bool(true);
assertThat(uut.getView().isDrawerOpen(Gravity.LEFT)).isFalse();
uut.mergeOptions(options);
assertThat(uut.getView().isDrawerOpen(Gravity.LEFT)).isTrue();
}
use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class SideMenuControllerTest method closeRightMenu.
private void closeRightMenu() {
Options options = new Options();
options.sideMenuRootOptions.right.visible = new Bool(false);
options.sideMenuRootOptions.right.animate = new Bool(false);
uut.mergeOptions(options);
uut.onDrawerSlide(right.getView(), 0);
}
use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class FloatingActionButtonTest method beforeEach.
@Override
public void beforeEach() {
super.beforeEach();
activity = newActivity();
childRegistry = new ChildControllersRegistry();
stackController = TestUtils.newStackController(activity).setFabPresenter(createFabPresenter()).build();
stackController.ensureViewIsCreated();
Options options = getOptionsWithFab();
childFab = new SimpleViewController(activity, childRegistry, "child1", options);
childNoFab = new SimpleViewController(activity, childRegistry, "child2", new Options());
}
use of com.reactnativenavigation.options.Options 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