@Test @RunWithCustomExecutor public void should_logbookStarted() throws Exception { VitamThreadUtils.getVitamSession().setTenantId(TENANT_ID); ArgumentCaptor<LogbookOperationParameters> captor = ArgumentCaptor.forClass(LogbookOperationParameters.class); AgenciesManager manager = new AgenciesManager(logbookOperationsClient, newOperationLogbookGUID(TENANT_ID), false); manager.logStarted(AGENCIES_IMPORT_EVENT); verify(logbookOperationsClient).create(captor.capture()); LogbookOperationParameters log = captor.getValue(); assertThat(log.getParameterValue(eventType)).isEqualTo(AGENCIES_IMPORT_EVENT); assertThat(log.getParameterValue(eventTypeProcess)).isEqualTo("MASTERDATA"); assertThat(log.getParameterValue(outcome)).isEqualTo("STARTED"); }
public void logStarted(String eventType) throws VitamException { final LogbookOperationParameters logbookParameters = LogbookParameterHelper .newLogbookOperationParameters(eip, eventType, eip, LogbookTypeProcess.MASTERDATA, StatusCode.STARTED, VitamLogbookMessages.getCodeOp(eventType, StatusCode.STARTED), eip); logbookClient.create(logbookParameters); }
AgenciesManager { public void logStarted(String eventType) throws VitamException { final LogbookOperationParameters logbookParameters = LogbookParameterHelper .newLogbookOperationParameters(eip, eventType, eip, LogbookTypeProcess.MASTERDATA, StatusCode.STARTED, VitamLogbookMessages.getCodeOp(eventType, StatusCode.STARTED), eip); logbookClient.create(logbookParameters); } }
AgenciesManager { public void logStarted(String eventType) throws VitamException { final LogbookOperationParameters logbookParameters = LogbookParameterHelper .newLogbookOperationParameters(eip, eventType, eip, LogbookTypeProcess.MASTERDATA, StatusCode.STARTED, VitamLogbookMessages.getCodeOp(eventType, StatusCode.STARTED), eip); logbookClient.create(logbookParameters); } AgenciesManager(LogbookOperationsClient logbookClient, GUID eip); @VisibleForTesting  AgenciesManager(LogbookOperationsClient logBookclient, GUID eip, boolean warning); }
AgenciesManager { public void logStarted(String eventType) throws VitamException { final LogbookOperationParameters logbookParameters = LogbookParameterHelper .newLogbookOperationParameters(eip, eventType, eip, LogbookTypeProcess.MASTERDATA, StatusCode.STARTED, VitamLogbookMessages.getCodeOp(eventType, StatusCode.STARTED), eip); logbookClient.create(logbookParameters); } AgenciesManager(LogbookOperationsClient logbookClient, GUID eip); @VisibleForTesting  AgenciesManager(LogbookOperationsClient logBookclient, GUID eip, boolean warning); void logStarted(String eventType); void logFinish(String fileName); void logEventSuccess(String eventType); void logEventWarning(String eventType); void logError(String errorsDetails, String subEvenType); void setEvDetData(ObjectNode evDetData); }
AgenciesManager { public void logStarted(String eventType) throws VitamException { final LogbookOperationParameters logbookParameters = LogbookParameterHelper .newLogbookOperationParameters(eip, eventType, eip, LogbookTypeProcess.MASTERDATA, StatusCode.STARTED, VitamLogbookMessages.getCodeOp(eventType, StatusCode.STARTED), eip); logbookClient.create(logbookParameters); } AgenciesManager(LogbookOperationsClient logbookClient, GUID eip); @VisibleForTesting  AgenciesManager(LogbookOperationsClient logBookclient, GUID eip, boolean warning); void logStarted(String eventType); void logFinish(String fileName); void logEventSuccess(String eventType); void logEventWarning(String eventType); void logError(String errorsDetails, String subEvenType); void setEvDetData(ObjectNode evDetData); static final VitamLogger LOGGER; }