use of com.reactnativenavigation.options.params.Bool in project react-native-navigation by wix.
the class OverlayTouchDelegateTest method onlyDownEventIsHandled.
@Test
public void onlyDownEventIsHandled() {
uut.setInterceptTouchOutside(new Bool(true));
uut.onInterceptTouchEvent(upEvent);
verify(uut, times(0)).handleDown(upEvent);
}
use of com.reactnativenavigation.options.params.Bool in project react-native-navigation by wix.
the class OverlayTouchDelegateTest method downEventIsHandled.
@Test
public void downEventIsHandled() {
uut.setInterceptTouchOutside(new Bool(true));
uut.onInterceptTouchEvent(downEvent);
verify(uut, times(1)).handleDown(downEvent);
}
use of com.reactnativenavigation.options.params.Bool in project react-native-navigation by wix.
the class OptionsApplyingTest method appliesTopBarVisible.
@Test
public void appliesTopBarVisible() {
stack.push(uut, new CommandListenerAdapter());
assertThat(uut.initialOptions).isSameAs(initialNavigationOptions);
initialNavigationOptions.topBar.title.text = new Text("the title");
assertThat(stack.getTopBar().getVisibility()).isNotEqualTo(View.GONE);
Options opts = new Options();
opts.topBar.visible = new Bool(false);
opts.topBar.animate = new Bool(false);
uut.mergeOptions(opts);
assertThat(stack.getTopBar().getVisibility()).isEqualTo(View.GONE);
}
use of com.reactnativenavigation.options.params.Bool in project react-native-navigation by wix.
the class SideMenuControllerTest method closeDrawerAndAssertVisibility.
private void closeDrawerAndAssertVisibility(ViewController<?> side, Functions.FuncR1<ViewController<?>, SideMenuOptions> opt) {
Options options = new Options();
(side == left ? options.sideMenuRootOptions.left : options.sideMenuRootOptions.right).visible = new Bool(false);
uut.mergeOptions(options);
assertThat(uut.getView().isDrawerOpen(getGravity(side))).isFalse();
assertThat(opt.run(side).visible.isTrue()).isFalse();
}
use of com.reactnativenavigation.options.params.Bool in project react-native-navigation by wix.
the class SideMenuControllerTest method openDrawerAndAssertVisibility.
private void openDrawerAndAssertVisibility(ViewController<?> side, Functions.FuncR1<ViewController<?>, SideMenuOptions> opt) {
Options options = new Options();
(side == left ? options.sideMenuRootOptions.left : options.sideMenuRootOptions.right).visible = new Bool(true);
uut.mergeOptions(options);
assertThat(uut.getView().isDrawerOpen(getGravity(side))).isTrue();
assertThat(opt.run(side).visible.isFalseOrUndefined()).isTrue();
}
Aggregations