public async Task ProvideReferenceDataVersionsAsync()
        {
            var ukprn             = 12345678;
            var cancellationToken = CancellationToken.None;
            var conRefNumbers     = new List <string> {
                "Ref1", "Ref2"
            };

            var referenceDataServiceMock = new Mock <IReferenceDataService>();

            referenceDataServiceMock.Setup(x => x.GetLarsVersion(cancellationToken)).ReturnsAsync("Lars Version");
            referenceDataServiceMock.Setup(x => x.GetPostcodeVersion(cancellationToken)).ReturnsAsync("Postcodes Version");
            referenceDataServiceMock.Setup(x => x.GetOrganisationVersion(cancellationToken)).ReturnsAsync("Org Version");

            var expectedResult = new ReferenceDataVersions
            {
                LarsVersion         = "Lars Version",
                PostcodeVersion     = "Postcodes Version",
                OrganisationVersion = "Org Version"
            };

            var refDataVersions = await NewProvider(referenceDataServiceMock.Object).ProvideReferenceDataVersionsAsync(cancellationToken);

            refDataVersions.Should().BeEquivalentTo(expectedResult);
        }
 private FileDetail BuildFileDetail(IDataStoreContext dataStoreContext, ReferenceDataVersions referenceDataVersions)
 {
     return(new FileDetail()
     {
         UKPRN = dataStoreContext.Ukprn,
         Filename = dataStoreContext.OriginalFilename,
         SubmittedTime = dataStoreContext.SubmissionDateTimeUtc,
         FileSizeKb = dataStoreContext.FileSizeInBytes / 1024,
         Success = true,
         TotalLearnersSubmitted = dataStoreContext.ValidLearnRefNumbersCount + dataStoreContext.InvalidLearnRefNumbersCount,
         TotalInvalidLearnersSubmitted = dataStoreContext.InvalidLearnRefNumbersCount,
         TotalValidLearnersSubmitted = dataStoreContext.ValidLearnRefNumbersCount,
         TotalErrorCount = dataStoreContext.ValidationTotalErrorCount,
         TotalWarningCount = dataStoreContext.ValidationTotalWarningCount,
         OrgName = referenceDataVersions.OrgName,
         OrgVersion = referenceDataVersions.OrgVersion,
         LarsVersion = referenceDataVersions.LarsVersion,
         EmployersVersion = referenceDataVersions.EmployersVersion,
         PostcodesVersion = referenceDataVersions.PostcodesVersion,
         CampusIdentifierVersion = referenceDataVersions.CampusIdentifierVersion,
         EasUploadDateTime = referenceDataVersions.EasUploadDateTime
     });
 }
 public void MapProcessingInformationData(IDataStoreCache cache, ReferenceDataVersions referenceDataVersions, IDataStoreContext dataStoreContext) => _processingInformationDataMapper.MapData(cache, referenceDataVersions, dataStoreContext);
 public void MapData(IDataStoreCache cache, ReferenceDataVersions referenceDataVersions, IDataStoreContext dataStoreContext)
 {
 }
 private void PopulateDataStoreCache(IDataStoreCache cache, ReferenceDataVersions referenceDataVersions, IDataStoreContext dataStoreContext)
 {
     cache.Add(BuildFileDetail(dataStoreContext, referenceDataVersions));
     cache.Add(BuildProcessingData(dataStoreContext));
 }
 public void MapData(IDataStoreCache cache, ReferenceDataVersions referenceDataVersions, IDataStoreContext dataStoreContext)
 {
     PopulateDataStoreCache(cache, referenceDataVersions, dataStoreContext);
 }