@Test public void updateTest() { LogbookOperationsClientFactory.changeMode(null); final LogbookOperationsClient client = LogbookOperationsClientFactory.getInstance().getClient(); assertNotNull(client); final LogbookOperationParameters logbookParameters = LogbookParameterHelper.newLogbookOperationParameters(); assertNotNull(logbookParameters); final Set<LogbookParameterName> mandatory = logbookParameters.getMandatoriesParameters(); boolean catchException = false; try { mandatory.add(LogbookParameterName.objectIdentifier); } catch (final UnsupportedOperationException uoe) { catchException = true; } assertTrue(catchException); assertNotNull(logbookParameters); fillLogbookParamaters(logbookParameters); catchException = false; try { client.update(logbookParameters); } catch (final LogbookClientException lce) { catchException = true; } assertFalse(catchException); }
@Override public void update(LogbookOperationParameters parameters) throws LogbookClientBadRequestException, LogbookClientNotFoundException, LogbookClientServerException { LogbookOperationsClientHelper.checkLogbookParameters(parameters); logInformation(UPDATE, parameters); }
LogbookOperationsClientMock extends AbstractMockClient implements LogbookOperationsClient { @Override public void update(LogbookOperationParameters parameters) throws LogbookClientBadRequestException, LogbookClientNotFoundException, LogbookClientServerException { LogbookOperationsClientHelper.checkLogbookParameters(parameters); logInformation(UPDATE, parameters); } }
LogbookOperationsClientMock extends AbstractMockClient implements LogbookOperationsClient { @Override public void update(LogbookOperationParameters parameters) throws LogbookClientBadRequestException, LogbookClientNotFoundException, LogbookClientServerException { LogbookOperationsClientHelper.checkLogbookParameters(parameters); logInformation(UPDATE, parameters); }  }
LogbookOperationsClientMock extends AbstractMockClient implements LogbookOperationsClient { @Override public void update(LogbookOperationParameters parameters) throws LogbookClientBadRequestException, LogbookClientNotFoundException, LogbookClientServerException { LogbookOperationsClientHelper.checkLogbookParameters(parameters); logInformation(UPDATE, parameters); }  @Override void create(LogbookOperationParameters parameters); @Override void update(LogbookOperationParameters parameters); @Override JsonNode selectOperation(JsonNode select); @Override JsonNode selectOperationSliced(JsonNode select); @Override JsonNode selectOperationById(String id); @Override RequestResponseOK traceability(); @Override void createDelegate(LogbookOperationParameters parameters); @Override void updateDelegate(LogbookOperationParameters parameters); @Override void bulkCreate(String eventIdProc, Iterable<LogbookOperationParameters> queue); @Override void bulkUpdate(String eventIdProc, Iterable<LogbookOperationParameters> queue); @Override void commitCreateDelegate(String eventIdProc); @Override void commitUpdateDelegate(String eventIdProc); @Override void close(); @Override RequestResponseOK traceabilityLfcUnit(); @Override RequestResponseOK traceabilityLfcObjectGroup(); @Override JsonNode reindex(IndexParameters indexParam); @Override JsonNode switchIndexes(SwitchIndexParameters switchIndexParam); @Override void traceabilityAudit(int tenant, AuditLogbookOptions options); @Override LogbookCheckResult checkLogbookCoherence(); @Override LifecycleTraceabilityStatus checkLifecycleTraceabilityWorkflowStatus(String operationId); }
LogbookOperationsClientMock extends AbstractMockClient implements LogbookOperationsClient { @Override public void update(LogbookOperationParameters parameters) throws LogbookClientBadRequestException, LogbookClientNotFoundException, LogbookClientServerException { LogbookOperationsClientHelper.checkLogbookParameters(parameters); logInformation(UPDATE, parameters); }  @Override void create(LogbookOperationParameters parameters); @Override void update(LogbookOperationParameters parameters); @Override JsonNode selectOperation(JsonNode select); @Override JsonNode selectOperationSliced(JsonNode select); @Override JsonNode selectOperationById(String id); @Override RequestResponseOK traceability(); @Override void createDelegate(LogbookOperationParameters parameters); @Override void updateDelegate(LogbookOperationParameters parameters); @Override void bulkCreate(String eventIdProc, Iterable<LogbookOperationParameters> queue); @Override void bulkUpdate(String eventIdProc, Iterable<LogbookOperationParameters> queue); @Override void commitCreateDelegate(String eventIdProc); @Override void commitUpdateDelegate(String eventIdProc); @Override void close(); @Override RequestResponseOK traceabilityLfcUnit(); @Override RequestResponseOK traceabilityLfcObjectGroup(); @Override JsonNode reindex(IndexParameters indexParam); @Override JsonNode switchIndexes(SwitchIndexParameters switchIndexParam); @Override void traceabilityAudit(int tenant, AuditLogbookOptions options); @Override LogbookCheckResult checkLogbookCoherence(); @Override LifecycleTraceabilityStatus checkLifecycleTraceabilityWorkflowStatus(String operationId);  }