@Test public void testDeleteRuntimeConfirmNo() { prepareRuntimeDelete(); noCommandCaptor.getValue().execute(); verify(runtimeService, never()).deleteRuntime(any(RuntimeKey.class), anyBoolean()); }
@Test public void testDeleteRuntimeConfirmNo() { prepareRuntimeDelete(); noCommandCaptor.getValue().execute(); verify(runtimeService, never()).deleteRuntime(any(RuntimeKey.class), anyBoolean()); }
@Test public void testDeleteRuntimeConfirmYesAndFailedAndDontForceDeletion() { prepareRuntimeDelete(); RuntimeKey currentKey = runtime.getKey();
@Test public void testDeleteRuntimeConfirmYesAndSuccessful() { prepareRuntimeDelete(); RuntimeKey currentKey = runtime.getKey(); when(translationService.format(RuntimePresenter_RuntimeDeleteSuccessMessage, item.getRuntime().getKey().getId())).thenReturn(SUCCESS_MESSAGE); when(translationService.getTranslation(RuntimePresenter_RuntimeDeletingMessage)).thenReturn(BUSY_POPUP_MESSAGE); yesCommandCaptor.getValue().execute(); verify(runtimeService, times(1)).deleteRuntime(currentKey, false); verify(popupHelper, times(1)).showBusyIndicator(BUSY_POPUP_MESSAGE); verify(popupHelper, times(1)).hideBusyIndicator(); verify(notificationEvent, times(1)).fire(new NotificationEvent(SUCCESS_MESSAGE, NotificationEvent.NotificationType.SUCCESS)); }
@Test public void testDeleteRuntimeConfirmYesAndFailedAndDontForceDeletion() { prepareRuntimeDelete(); RuntimeKey currentKey = runtime.getKey();
@Test public void testDeleteRuntimeConfirmYesAndSuccessful() { prepareRuntimeDelete(); RuntimeKey currentKey = runtime.getKey(); when(translationService.format(RuntimePresenter_RuntimeDeleteSuccessMessage, item.getRuntime().getKey().getId())).thenReturn(SUCCESS_MESSAGE); when(translationService.getTranslation(RuntimePresenter_RuntimeDeletingMessage)).thenReturn(BUSY_POPUP_MESSAGE); yesCommandCaptor.getValue().execute(); verify(runtimeService, times(1)).deleteRuntime(currentKey, false); verify(popupHelper, times(1)).showBusyIndicator(BUSY_POPUP_MESSAGE); verify(popupHelper, times(1)).hideBusyIndicator(); verify(notificationEvent, times(1)).fire(new NotificationEvent(SUCCESS_MESSAGE, NotificationEvent.NotificationType.SUCCESS)); }
@Test public void testDeleteRuntimeConfirmYesAndFailedAndForceDeletion() { prepareRuntimeDelete(); RuntimeKey currentKey = runtime.getKey();
@Test public void testDeleteRuntimeConfirmYesAndFailedAndForceDeletion() { prepareRuntimeDelete(); RuntimeKey currentKey = runtime.getKey();