use of org.kie.workbench.common.stunner.core.marshaller.MarshallingMessage in project kie-wb-common by kiegroup.
the class IntegrationHandlerImplTest method testMigrateFromJBPMDesignerToStunnerMarshallingWithErrors.
private void testMigrateFromJBPMDesignerToStunnerMarshallingWithErrors(boolean isDirty) {
List<MarshallingMessage> messages = Arrays.asList(mock(MarshallingMessage.class), mock(MarshallingMessage.class));
prepareMigrateFromJBPMDesignerToStunner(MarshallingResponse.State.ERROR, messages);
MigrateRequest expectedRequest = MigrateRequest.newFromJBPMDesignerToStunner(jbpmPath, JBPM_NAME, BPMN_EXTENSION, ToStunnerCommitMessage, projectDiagram);
MigrateResult result = new MigrateResult(null, IntegrationService.ServiceError.JBPM_DESIGNER_PROCESS_ALREADY_EXIST, "messageKey", new ArrayList<>());
when(integrationService.migrateDiagram(expectedRequest)).thenReturn(result);
handler.migrateFromJBPMDesignerToStunner(jbpmPath, place, isDirty, saveSuccessfulCommand);
// ask user for saving and say yes.
verifySavePopupWasShownAndRespond(isDirty, true);
// ask user for starting the migration and say yes
verifyUserWasAskedForStartingToStunnerMigrationAndRespond(true);
verifyMarshallingResponseWithErrorsWereShown(messages);
}
Aggregations