use of org.eclipse.che.ide.api.dialogs.CancelCallback in project che by eclipse.
the class SshKeyManagerPresenterTest method testOnGenerateClickedWhenUserCancelGenerateKey.
@Test
public void testOnGenerateClickedWhenUserCancelGenerateKey() {
when(dialogFactory.createInputDialog(anyString(), anyString(), (InputCallback) anyObject(), (CancelCallback) anyObject())).thenReturn(inputDialog);
presenter.onGenerateClicked();
verify(dialogFactory).createInputDialog(anyString(), anyString(), (InputCallback) anyObject(), cancelCallbackCaptor.capture());
CancelCallback cancelCallback = cancelCallbackCaptor.getValue();
cancelCallback.cancelled();
verify(service, never()).generatePair(Matchers.eq(SshKeyManagerPresenter.VCS_SSH_SERVICE), eq(GITHUB_HOST));
}
Aggregations