use of com.reactnativenavigation.react.CommandListener in project react-native-navigation by wix.
the class ModalStackTest method dismissModal_rejectIfModalNotFound.
@SuppressWarnings("Convert2Lambda")
@Test
public void dismissModal_rejectIfModalNotFound() {
CommandListener listener = spy(new CommandListenerAdapter());
Runnable onModalWillDismiss = spy(new Runnable() {
@Override
public void run() {
}
});
uut.dismissModal(MODAL_ID_1, root, listener);
verify(onModalWillDismiss, times(0)).run();
verify(listener, times(1)).onError(anyString());
verifyNoMoreInteractions(listener);
}
Aggregations