public void Then_Returns_Expected_Results() { CsvService.Received(1).ReadAndParseFileAsync(Arg.Any <AssessmentCsvRecordRequest>()); CsvService.Received(1).WriteFileAsync(Arg.Any <List <BulkProcessValidationError> >()); BlobService.Received(1).UploadFromByteArrayAsync(Arg.Any <BlobStorageData>()); BlobService.Received(1).MoveFileAsync(Arg.Any <BlobStorageData>()); DocumentUploadHistoryService.Received(1).CreateDocumentUploadHistory(Arg.Any <DocumentUploadHistoryDetails>()); Response.IsSuccess.Should().BeFalse(); Response.BlobUniqueReference.Should().Be(BlobUniqueRef); }
public void Then_Returns_Expected_Results() { BlobService.Received(1).DownloadFileAsync(Arg.Any <BlobStorageData>()); CsvService.Received(1).ReadAndParseFileAsync(Arg.Any <ResultCsvRecordRequest>()); ResultService.Received(1).ValidateResultsAsync(AoUkprn, Arg.Is <IEnumerable <ResultCsvRecordResponse> >(x => x.All(r => r.IsValid))); CsvService.Received(1).WriteFileAsync(Arg.Any <List <BulkProcessValidationError> >()); BlobService.Received(1).UploadFromByteArrayAsync(Arg.Any <BlobStorageData>()); BlobService.Received(1).MoveFileAsync(Arg.Any <BlobStorageData>()); DocumentUploadHistoryService.Received(1).CreateDocumentUploadHistory(Arg.Any <DocumentUploadHistoryDetails>()); Response.IsSuccess.Should().BeFalse(); Response.BlobUniqueReference.Should().Be(BlobUniqueRef); }
public void Then_Returns_Expected_Results() { BlobService.Received(1).DownloadFileAsync(Arg.Any <BlobStorageData>()); CsvService.Received(1).ReadAndParseFileAsync(Arg.Any <AssessmentCsvRecordRequest>()); AssessmentService.Received(1).ValidateAssessmentsAsync(AoUkprn, Arg.Any <IEnumerable <AssessmentCsvRecordResponse> >()); BlobService.Received(1).MoveFileAsync(Arg.Any <BlobStorageData>()); DocumentUploadHistoryService.Received(1).CreateDocumentUploadHistory(Arg.Any <DocumentUploadHistoryDetails>()); Response.IsSuccess.Should().BeTrue(); Response.ErrorFileSize.Should().Be(0); Response.Stats.Should().NotBeNull(); Response.Stats.TotalRecordsCount.Should().Be(expectedStage3Response.Count); }
public void Then_Returns_Expected_Results() { BlobService.Received(1).DownloadFileAsync(Arg.Any <BlobStorageData>()); CsvService.Received(1).ReadAndParseFileAsync(Arg.Any <ResultCsvRecordRequest>()); ResultService.Received(1).ValidateResultsAsync(AoUkprn, Arg.Any <IEnumerable <ResultCsvRecordResponse> >()); ResultService.Received(1).TransformResultsModel(Arg.Any <IList <ResultRecordResponse> >(), Arg.Any <string>()); ResultService.Received(1).CompareAndProcessResultsAsync(Arg.Any <IList <TqPathwayResult> >()); BlobService.Received(1).MoveFileAsync(Arg.Any <BlobStorageData>()); DocumentUploadHistoryService.Received(1).CreateDocumentUploadHistory(Arg.Any <DocumentUploadHistoryDetails>()); Response.IsSuccess.Should().BeTrue(); Response.Stats.Should().NotBeNull(); Response.ErrorFileSize.Should().Be(0); }
public void Then_Returns_Expected_Results() { BlobService.Received(1).DownloadFileAsync(Arg.Any <BlobStorageData>()); CsvService.Received(1).ReadAndParseFileAsync(Arg.Any <RegistrationCsvRecordRequest>()); RegistrationService.Received(1).ValidateRegistrationTlevelsAsync(AoUkprn, Arg.Any <IEnumerable <RegistrationCsvRecordResponse> >()); RegistrationService.Received(1).TransformRegistrationModel(Arg.Any <IList <RegistrationRecordResponse> >(), Arg.Any <string>()); RegistrationService.Received(1).CompareAndProcessRegistrationsAsync(Arg.Any <IList <TqRegistrationProfile> >()); CsvService.Received(1).WriteFileAsync(Arg.Any <List <BulkProcessValidationError> >()); BlobService.Received(1).UploadFromByteArrayAsync(Arg.Any <BlobStorageData>()); BlobService.Received(1).MoveFileAsync(Arg.Any <BlobStorageData>()); DocumentUploadHistoryService.Received(1).CreateDocumentUploadHistory(Arg.Any <DocumentUploadHistoryDetails>()); Response.IsSuccess.Should().BeFalse(); Response.BlobUniqueReference.Should().Be(BlobUniqueRef); }