//[Fact] public async Task SystemTest() { var container = "Output"; var cancellationToken = CancellationToken.None; var ukprn = 10005788; var fcsService = new Mock <IFCSProviderService>(); fcsService.Setup(f => f.GetContractAllocationNumberFSPCodeLookupAsync(ukprn, cancellationToken)).ReturnsAsync(new Dictionary <string, string>()); var reportServiceContextMock = new Mock <IReportServiceContext>(); var periodisedValuesLookupProvider = new Mock <IPeriodisedValuesLookupProviderService>(); periodisedValuesLookupProvider.Setup(p => p.ProvideAsync(reportServiceContextMock.Object, cancellationToken)).ReturnsAsync(new PeriodisedValuesLookup()); var referenceDataServiceMock = new Mock <IReferenceDataService>(); var dateTimeProviderMock = new Mock <IDateTimeProvider>(); var persistReportDataMock = new Mock <IPersistReportData>(); referenceDataServiceMock .Setup(m => m.GetLatestIlrSubmissionFileNameAsync(10005788, It.IsAny <CancellationToken>())) .ReturnsAsync("10005788/ILR-10005788-1920-20190801-000001-01.xml"); var fundingSummaryReportModelBuilder = new FundingSummaryReportModelBuilder(referenceDataServiceMock.Object, dateTimeProviderMock.Object); var submissionDateTime = new DateTime(2019, 3, 1); reportServiceContextMock.Setup(c => c.Ukprn).Returns(10005788); reportServiceContextMock.Setup(c => c.Container).Returns(container); reportServiceContextMock.Setup(c => c.SubmissionDateTimeUtc).Returns(submissionDateTime); var excelService = new ExcelService(new FileServiceStub()); dateTimeProviderMock.Setup(p => p.ConvertUtcToUk(submissionDateTime)).Returns(submissionDateTime); var fundingSummaryReportRenderService = new FundingSummaryReportRenderService(); var report = NewReport( Mock.Of <ILogger>(), Mock.Of <IStreamableKeyValuePersistenceService>(), dateTimeProviderMock.Object, fundingSummaryReportModelBuilder, excelService, fundingSummaryReportRenderService, periodisedValuesLookupProvider.Object, fcsService.Object, persistReportDataMock.Object); excelService.ApplyLicense(); using (var memoryStream = new MemoryStream()) { using (var zipArchive = new ZipArchive(memoryStream, ZipArchiveMode.Update)) { await report.GenerateReport(reportServiceContextMock.Object, zipArchive, cancellationToken); } } }