Search in sources :

Example 6 with SideMenuOptions

use of com.reactnativenavigation.options.SideMenuOptions 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();
}
Also used : SideMenuOptions(com.reactnativenavigation.options.SideMenuOptions) Options(com.reactnativenavigation.options.Options) Bool(com.reactnativenavigation.options.params.Bool)

Aggregations

Options (com.reactnativenavigation.options.Options)6 SideMenuOptions (com.reactnativenavigation.options.SideMenuOptions)6 LayoutParams (android.view.ViewGroup.LayoutParams)4 BaseTest (com.reactnativenavigation.BaseTest)4 SimpleComponentViewController (com.reactnativenavigation.mocks.SimpleComponentViewController)4 Test (org.junit.Test)4 Bool (com.reactnativenavigation.options.params.Bool)2 Number (com.reactnativenavigation.options.params.Number)2