Search in sources :

Example 16 with Bool

use of com.reactnativenavigation.options.params.Bool in project react-native-navigation by wix.

the class SideMenuControllerTest method openRightMenu.

private void openRightMenu() {
    Options options = new Options();
    options.sideMenuRootOptions.right.visible = new Bool(true);
    options.sideMenuRootOptions.right.animate = new Bool(false);
    uut.mergeOptions(options);
    uut.onDrawerSlide(right.getView(), 1);
}
Also used : SideMenuOptions(com.reactnativenavigation.options.SideMenuOptions) Options(com.reactnativenavigation.options.Options) Bool(com.reactnativenavigation.options.params.Bool)

Example 17 with Bool

use of com.reactnativenavigation.options.params.Bool 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);
}
Also used : Number(com.reactnativenavigation.options.params.Number) Bool(com.reactnativenavigation.options.params.Bool) Text(com.reactnativenavigation.options.params.Text) NullText(com.reactnativenavigation.options.params.NullText) ThemeColour(com.reactnativenavigation.options.params.ThemeColour) NullText(com.reactnativenavigation.options.params.NullText) Colour(com.reactnativenavigation.options.params.Colour) ThemeColour(com.reactnativenavigation.options.params.ThemeColour)

Example 18 with Bool

use of com.reactnativenavigation.options.params.Bool in project react-native-navigation by wix.

the class ViewControllerTest method isRendered_delegatesToView.

@Test
public void isRendered_delegatesToView() {
    uut.setWaitForRender(new Bool(true));
    uut.view = mock(ViewGroup.class, withSettings().extraInterfaces(Component.class));
    uut.isRendered();
    verify((Component) uut.view).isRendered();
}
Also used : Bool(com.reactnativenavigation.options.params.Bool) NullBool(com.reactnativenavigation.options.params.NullBool) ViewGroup(android.view.ViewGroup) Component(com.reactnativenavigation.views.component.Component) BaseTest(com.reactnativenavigation.BaseTest) Test(org.junit.Test)

Example 19 with Bool

use of com.reactnativenavigation.options.params.Bool in project react-native-navigation by wix.

the class OverlayTouchDelegateTest method nonDownEventsDontIntercept.

@Test
public void nonDownEventsDontIntercept() {
    uut.setInterceptTouchOutside(new Bool(true));
    assertThat(uut.onInterceptTouchEvent(upEvent)).isFalse();
}
Also used : Bool(com.reactnativenavigation.options.params.Bool) BaseTest(com.reactnativenavigation.BaseTest) Test(org.junit.Test)

Example 20 with Bool

use of com.reactnativenavigation.options.params.Bool in project react-native-navigation by wix.

the class OverlayTouchDelegateTest method nonDownEventsInvokeSuperImplementation.

@Test
public void nonDownEventsInvokeSuperImplementation() {
    uut.setInterceptTouchOutside(new Bool(true));
    uut.onInterceptTouchEvent(upEvent);
    verify(component).superOnInterceptTouchEvent(upEvent);
}
Also used : Bool(com.reactnativenavigation.options.params.Bool) BaseTest(com.reactnativenavigation.BaseTest) Test(org.junit.Test)

Aggregations

Bool (com.reactnativenavigation.options.params.Bool)40 BaseTest (com.reactnativenavigation.BaseTest)29 Test (org.junit.Test)29 Options (com.reactnativenavigation.options.Options)14 SideMenuOptions (com.reactnativenavigation.options.SideMenuOptions)10 CommandListenerAdapter (com.reactnativenavigation.react.CommandListenerAdapter)7 Colour (com.reactnativenavigation.options.params.Colour)6 Text (com.reactnativenavigation.options.params.Text)6 ThemeColour (com.reactnativenavigation.options.params.ThemeColour)6 MenuItem (android.view.MenuItem)5 PorterDuffColorFilter (android.graphics.PorterDuffColorFilter)4 Drawable (android.graphics.drawable.Drawable)4 NullBool (com.reactnativenavigation.options.params.NullBool)4 IconBackgroundDrawable (com.reactnativenavigation.views.stack.topbar.titlebar.IconBackgroundDrawable)4 ViewGroup (android.view.ViewGroup)3 StackController (com.reactnativenavigation.viewcontrollers.stack.StackController)3 SimpleComponentViewController (com.reactnativenavigation.mocks.SimpleComponentViewController)2 IconBackgroundOptions (com.reactnativenavigation.options.IconBackgroundOptions)2 View (android.view.View)1 FrameLayout (android.widget.FrameLayout)1