use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class ChildControllerTest method mergeOptions.
@Test
public void mergeOptions() {
newActivity().setContentView(uut.getView());
Options options = new Options();
uut.mergeOptions(options);
verify(presenter).mergeOptions(uut, options);
}
use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class ChildControllerTest method mergeOptions_mergeWithParentViewController.
@Test
public void mergeOptions_mergeWithParentViewController() {
Options options = new Options();
uut.mergeOptions(options);
verify(uut.getParentController()).mergeChildOptions(options, uut);
}
use of com.reactnativenavigation.options.Options in project react-native-navigation by wix.
the class ChildControllerTest method beforeEach.
@Override
public void beforeEach() {
childRegistry = spy(new ChildControllersRegistry());
presenter = Mockito.mock(Presenter.class);
uut = new SimpleViewController(newActivity(), childRegistry, "childId", presenter, new Options()) {
@Override
public Options resolveCurrentOptions() {
return resolvedOptions;
}
};
ParentController<?> parent = Mockito.mock(ParentController.class);
Mockito.when(parent.resolveChildOptions(uut)).thenReturn(Options.EMPTY);
uut.setParentController(parent);
}
use of com.reactnativenavigation.options.Options 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.Options in project react-native-navigation by wix.
the class ModalStackTest method setDefaultOptions.
@Test
public void setDefaultOptions() {
Options defaultOptions = new Options();
uut.setDefaultOptions(defaultOptions);
verify(presenter).setDefaultOptions(defaultOptions);
}
Aggregations