use of com.reactnativenavigation.react.CommandListenerAdapter in project react-native-navigation by wix.
the class NavigatorTest method pop_InvalidDoesNothing_Promise.
@Test
public void pop_InvalidDoesNothing_Promise() {
uut.pop("123", Options.EMPTY, new CommandListenerAdapter());
uut.setRoot(child1, new CommandListenerAdapter(), reactInstanceManager);
uut.pop(child1.getId(), Options.EMPTY, new CommandListenerAdapter() {
@Override
public void onError(String reason) {
assertThat(uut.getChildControllers()).hasSize(1);
}
});
}
use of com.reactnativenavigation.react.CommandListenerAdapter in project react-native-navigation by wix.
the class NavigatorTest method setStackRoot.
@Test
public void setStackRoot() {
disablePushAnimation(child1, child2, child3);
StackController stack = newStack(child1, child2);
uut.setRoot(stack, new CommandListenerAdapter(), reactInstanceManager);
stack.setRoot(Collections.singletonList(child3), new CommandListenerAdapter());
assertThat(stack.getChildControllers()).containsOnly(child3);
}
use of com.reactnativenavigation.react.CommandListenerAdapter in project react-native-navigation by wix.
the class NavigatorTest method handleBack_falseIfRootIsNotSetAndSingleModalIsDisplayed.
@Test
public void handleBack_falseIfRootIsNotSetAndSingleModalIsDisplayed() {
disableShowModalAnimation(child1, child2, child3);
uut.showModal(child1, new CommandListenerAdapter());
uut.showModal(child2, new CommandListenerAdapter());
assertThat(uut.handleBack(new CommandListenerAdapter())).isTrue();
assertThat(uut.handleBack(new CommandListenerAdapter())).isFalse();
}
use of com.reactnativenavigation.react.CommandListenerAdapter in project react-native-navigation by wix.
the class NavigatorTest method setRoot_AddsChildControllerView.
@Test
public void setRoot_AddsChildControllerView() {
uut.setRoot(child1, new CommandListenerAdapter(), reactInstanceManager);
assertIsChild(uut.getRootLayout(), child1.getView());
}
use of com.reactnativenavigation.react.CommandListenerAdapter in project react-native-navigation by wix.
the class NavigatorTest method destroy_destroyOverlayManager.
@Test
public void destroy_destroyOverlayManager() {
uut.setRoot(parentController, new CommandListenerAdapter(), reactInstanceManager);
activityController.destroy();
verify(overlayManager).destroy(uut.getOverlaysLayout());
}
Aggregations