public void DownloadFile_WhenExceptionThrown_LogsException() { Exception expected = SetUpWhenExceptionThrown(); InvokeDownloadFile(); Received.InOrder(() => { loggingServiceMock.LogVerbose("DownloadStatsFile Invoked"); fileDownloadDatabaseServiceMock.IsAvailable(); loggingServiceMock.LogResult(Arg.Any <FileDownloadResult>()); loggingServiceMock.LogException(expected); }); }
private (bool isAvailable, FailedReason reason) InvokeIsAvailable() { return(systemUnderTest.IsAvailable()); }
private bool DatabaseUnavailable(out FailedReason failedReason) { (bool isAvailable, FailedReason reason) = fileDownloadDatabaseService.IsAvailable(); failedReason = reason; return(!isAvailable); }