use of org.kie.workbench.common.stunner.bpmn.integration.service.MigrateResult in project kie-wb-common by kiegroup.
the class IntegrationHandlerImplTest method testMigrateFromStunnerWithServiceError.
private void testMigrateFromStunnerWithServiceError(boolean isDirty) {
MigrateRequest expectedRequest = MigrateRequest.newFromStunnerToJBPMDesigner(stunnerPath, STUNNER_NAME, BPMN2_EXTENSION, ToJBPMCommitMessage);
Path resultPath = mock(Path.class);
String messageKey = "messageKey";
List<?> messageArguments = new ArrayList<>();
MigrateResult result = new MigrateResult(resultPath, IntegrationService.ServiceError.JBPM_DESIGNER_PROCESS_ALREADY_EXIST, messageKey, messageArguments);
when(integrationService.migrateDiagram(expectedRequest)).thenReturn(result);
handler.migrateFromStunnerToJBPMDesigner(stunnerPath, place, isDirty, saveSuccessfulCommand);
verifySavePopupWasShownAndRespond(isDirty, true);
verifyUserWasAskedForStartingToJBPMMigrationAndRespond(true);
when(translationService.getValue(messageKey, messageArguments.toArray())).thenReturn(ERROR);
errorPopup.showMessage(ERROR);
}
Aggregations