Beispiel #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>());
            });
        }
 private void InvokeUpdateToLatest()
 {
     systemUnderTest.UpdateToLatest();
 }
Beispiel #3
0
 private void UpdateToLatest()
 {
     fileDownloadDatabaseService.UpdateToLatest();
 }