public async Task UploadFile(FilePayload filePayload) { await dataStoreService.UploadFile(filePayload); fileDownloadDatabaseService.FileDownloadFinished(filePayload); try { fileDownloadDatabaseService.FileValidationStarted(filePayload); fileValidationService.ValidateFile(filePayload); fileDownloadDatabaseService.FileValidated(filePayload); } catch (FileDownloadFailedDecompressionException) { throw; } catch (InvalidStatsFileException) { throw; } catch (Exception exception) { throw new UnexpectedValidationException(exception); } }
public void UploadFile_WhenInvoked_UploadsFile() { InvokeUploadFile(); Received.InOrder(() => { dataStoreServiceMock.UploadFile(filePayload); fileDownloadDatabaseServiceMock.FileDownloadFinished(filePayload); fileDownloadDatabaseServiceMock.FileValidationStarted(filePayload); fileValidationServiceMock.ValidateFile(filePayload); fileDownloadDatabaseServiceMock.FileValidated(filePayload); }); }
private void InvokeFileValidationStarted() { systemUnderTest.FileValidationStarted(filePayload); }