use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class ComponentViewControllerTest method mergeOptions_delegatesToPresenterIfViewIsNotShown.
@Test
public void mergeOptions_delegatesToPresenterIfViewIsNotShown() {
Options options = new Options();
Java6Assertions.assertThat(uut.isViewShown()).isFalse();
uut.mergeOptions(options);
Mockito.verifyNoInteractions(presenter);
Mockito.when(uut.isViewShown()).thenReturn(true);
uut.mergeOptions(options);
Mockito.verify(presenter).mergeOptions(uut.getView(), options);
}
use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class ComponentViewControllerTest method applyOptions.
@Test
public void applyOptions() {
Options options = new Options();
uut.applyOptions(options);
Mockito.verify(view).applyOptions(options);
Mockito.verify(presenter).applyOptions(view, resolvedOptions);
}
use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class ComponentViewControllerTest method setDefaultOptions.
@Test
public void setDefaultOptions() {
Options defaultOptions = new Options();
uut.setDefaultOptions(defaultOptions);
Mockito.verify(presenter).setDefaultOptions(defaultOptions);
}
use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class SideMenuControllerTest method closeLeftMenu.
private void closeLeftMenu() {
Options options = new Options();
options.sideMenuRootOptions.left.visible = new Bool(false);
options.sideMenuRootOptions.left.animate = new Bool(false);
uut.mergeOptions(options);
uut.onDrawerSlide(left.getView(), 0);
}
use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class SideMenuControllerTest method setLeftController_matchesParentByDefault.
@Test
public void setLeftController_matchesParentByDefault() {
SideMenuOptions options = new SideMenuOptions();
assertThat(options.width.hasValue()).isFalse();
assertThat(options.height.hasValue()).isFalse();
uut.options.sideMenuRootOptions.left = options;
SimpleComponentViewController componentViewController = new SimpleComponentViewController(activity, childRegistry, "left", new Options());
uut.setLeftController(componentViewController);
LayoutParams params = componentViewController.getView().getLayoutParams();
assertThat(params.width).isEqualTo(MATCH_PARENT);
assertThat(params.height).isEqualTo(MATCH_PARENT);
}
Aggregations