示例#1
0
        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());
 }
示例#3
0
 private bool DatabaseUnavailable(out FailedReason failedReason)
 {
     (bool isAvailable, FailedReason reason) = fileDownloadDatabaseService.IsAvailable();
     failedReason = reason;
     return(!isAvailable);
 }