use of org.guvnor.ala.ui.client.resources.i18n.GuvnorAlaUIConstants.RuntimePresenter_RuntimeStoppingMessage in project kie-wb-common by kiegroup.
the class RuntimePresenterActionsTest method testStopRuntimeConfirmYesAndFailed.
@Test
public void testStopRuntimeConfirmYesAndFailed() {
prepareRuntimeStop();
RuntimeKey currentKey = runtime.getKey();
when(translationService.getTranslation(RuntimePresenter_RuntimeStoppingMessage)).thenReturn(BUSY_POPUP_MESSAGE);
doThrow(new RuntimeException(ERROR_MESSAGE)).when(runtimeService).stopRuntime(currentKey);
yesCommandCaptor.getValue().execute();
verify(runtimeService, times(1)).stopRuntime(currentKey);
verify(defaultErrorCallback, times(1)).error(any(Message.class), exceptionCaptor.capture());
assertEquals(ERROR_MESSAGE, exceptionCaptor.getValue().getCause().getMessage());
verify(popupHelper, times(1)).showBusyIndicator(BUSY_POPUP_MESSAGE);
verify(popupHelper, times(1)).hideBusyIndicator();
}
Aggregations