Example #1
0
        public void DownloadFile_WhenInvoked_StatsDownloadIsPerformed()
        {
            InvokeDownloadFile();

            Received.InOrder(async() =>
            {
                loggingServiceMock.LogVerbose("DownloadStatsFile Invoked");
                fileDownloadDatabaseServiceMock.IsAvailable();
                fileDownloadDatabaseServiceMock.UpdateToLatest();
                dateTimeServiceMock.DateTimeNow();
                loggingServiceMock.LogVerbose($"Stats file download started: {dateTime}");
                fileDownloadDatabaseServiceMock.FileDownloadStarted(Arg.Any <FilePayload>());
                fileDownloadMinimumWaitTimeServiceMock.IsMinimumWaitTimeMet(Arg.Any <FilePayload>());
                filePayloadSettingsServiceMock.SetFilePayloadDownloadDetails(Arg.Any <FilePayload>());
                downloadServiceMock.DownloadFile(Arg.Any <FilePayload>());
                dateTimeServiceMock.DateTimeNow();
                loggingServiceMock.LogVerbose($"Stats file download completed: {dateTime}");
                await filePayloadUploadServiceMock.UploadFile(Arg.Any <FilePayload>());
                resourceCleanupServiceMock.Cleanup(Arg.Any <FileDownloadResult>());
                loggingServiceMock.LogResult(Arg.Any <FileDownloadResult>());
            });
        }
Example #2
0
 private bool IsMinimumWaitTimeNotMet(FilePayload filePayload)
 {
     return(!fileDownloadMinimumWaitTimeService.IsMinimumWaitTimeMet(filePayload));
 }
 private bool InvokeIsMinimumWaitTimeMet()
 {
     return(systemUnderTest.IsMinimumWaitTimeMet(filePayload));
 }
 public bool IsMinimumWaitTimeMet(FilePayload filePayload)
 {
     return(testHarnessSettingsService.IsMinimumWaitTimeMetDisabled() ||
            fileDownloadMinimumWaitTimeService.IsMinimumWaitTimeMet(filePayload));
 }