@Test @SuppressWarnings("unchecked") public void testMigrateFromJBPMDesignerToStunnerWithUnexpectedErrorNoDiagramWasReturned() { MarshallingResponse<ProjectDiagram> marshallingResponse = new MarshallingResponse.MarshallingResponseBuilder<ProjectDiagram>() .state(MarshallingResponse.State.SUCCESS) .messages(Collections.EMPTY_LIST) .result(null) .build(); when(integrationService.getDiagramByPath(jbpmPath, MarshallingRequest.Mode.AUTO)).thenReturn(marshallingResponse); handler.migrateFromJBPMDesignerToStunner(jbpmPath, place, false, saveSuccessfulCommand); verifyUserWasAskedForStartingToStunnerMigrationAndRespond(true); verify(errorPopup).showMessage(MigrateToStunnerNoDiagramHasBeenReturned); }
@Override public void migrateFromJBPMDesignerToStunner(Path path, PlaceRequest place, boolean isDirty, ParameterizedCommand<Consumer<Boolean>> saveCommand) { checkIfDirtyAndMigrate(isDirty, saveCommand, () -> fromJBPMDesignerToStunner(path, place)); }
IntegrationHandlerImpl implements IntegrationHandler { @Override public void migrateFromJBPMDesignerToStunner(Path path, PlaceRequest place, boolean isDirty, ParameterizedCommand<Consumer<Boolean>> saveCommand) { checkIfDirtyAndMigrate(isDirty, saveCommand, () -> fromJBPMDesignerToStunner(path, place)); } }
IntegrationHandlerImpl implements IntegrationHandler { @Override public void migrateFromJBPMDesignerToStunner(Path path, PlaceRequest place, boolean isDirty, ParameterizedCommand<Consumer<Boolean>> saveCommand) { checkIfDirtyAndMigrate(isDirty, saveCommand, () -> fromJBPMDesignerToStunner(path, place)); } IntegrationHandlerImpl(); @Inject  IntegrationHandlerImpl(final Caller<IntegrationService> integrationService,
                                  final PlaceManager placeManger,
                                  final PopupUtil popupUtil,
                                  final ErrorPopupPresenter errorPopup,
                                  final MarshallingResponsePopup responsePopup,
                                  final ClientTranslationService translationService,
                                  final Event<NotificationEvent> notification); }
IntegrationHandlerImpl implements IntegrationHandler { @Override public void migrateFromJBPMDesignerToStunner(Path path, PlaceRequest place, boolean isDirty, ParameterizedCommand<Consumer<Boolean>> saveCommand) { checkIfDirtyAndMigrate(isDirty, saveCommand, () -> fromJBPMDesignerToStunner(path, place)); } IntegrationHandlerImpl(); @Inject  IntegrationHandlerImpl(final Caller<IntegrationService> integrationService,
                                  final PlaceManager placeManger,
                                  final PopupUtil popupUtil,
                                  final ErrorPopupPresenter errorPopup,
                                  final MarshallingResponsePopup responsePopup,
                                  final ClientTranslationService translationService,
                                  final Event<NotificationEvent> notification); @Override void migrateFromJBPMDesignerToStunner(Path path, PlaceRequest place, boolean isDirty, ParameterizedCommand<Consumer<Boolean>> saveCommand); @Override void migrateFromStunnerToJBPMDesigner(Path path, PlaceRequest place, boolean isDirty, ParameterizedCommand<Consumer<Boolean>> saveCommand); }
IntegrationHandlerImpl implements IntegrationHandler { @Override public void migrateFromJBPMDesignerToStunner(Path path, PlaceRequest place, boolean isDirty, ParameterizedCommand<Consumer<Boolean>> saveCommand) { checkIfDirtyAndMigrate(isDirty, saveCommand, () -> fromJBPMDesignerToStunner(path, place)); } IntegrationHandlerImpl(); @Inject  IntegrationHandlerImpl(final Caller<IntegrationService> integrationService,
                                  final PlaceManager placeManger,
                                  final PopupUtil popupUtil,
                                  final ErrorPopupPresenter errorPopup,
                                  final MarshallingResponsePopup responsePopup,
                                  final ClientTranslationService translationService,
                                  final Event<NotificationEvent> notification); @Override void migrateFromJBPMDesignerToStunner(Path path, PlaceRequest place, boolean isDirty, ParameterizedCommand<Consumer<Boolean>> saveCommand); @Override void migrateFromStunnerToJBPMDesigner(Path path, PlaceRequest place, boolean isDirty, ParameterizedCommand<Consumer<Boolean>> saveCommand);  }