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