use of org.guvnor.ala.ui.client.resources.i18n.GuvnorAlaUIConstants.RuntimePresenter_RuntimeDeletingForcedMessage in project kie-wb-common by kiegroup.
the class RuntimePresenterActionsTest method testForceDeleteRuntimeConfirmYesAndFailed.
@Test
public void testForceDeleteRuntimeConfirmYesAndFailed() {
prepareRuntimeForceDelete();
RuntimeKey currentKey = runtime.getKey();
when(translationService.getTranslation(RuntimePresenter_RuntimeDeletingForcedMessage)).thenReturn(BUSY_POPUP_MESSAGE);
doThrow(new RuntimeException(ERROR_MESSAGE)).when(runtimeService).deleteRuntime(currentKey, true);
yesCommandCaptor.getValue().execute();
verify(runtimeService, times(1)).deleteRuntime(currentKey, true);
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