コード例 #1
0
        private void ComparePriceEpisodes(EarningEvents.Messages.Events.EarningEvent earningEvent,
                                          EarningEventModel earningEventModel)
        {
            if (earningEvent.PriceEpisodes.IsNullOrEmpty())
            {
                return;
            }
            earningEventModel.PriceEpisodes.Should().NotBeNullOrEmpty();

            foreach (var priceEpisode in earningEvent.PriceEpisodes)
            {
                var priceEpisodeModel = earningEventModel.PriceEpisodes.FirstOrDefault(x => x.PriceEpisodeIdentifier == priceEpisode.Identifier);
                priceEpisodeModel.Should().NotBeNull();
                priceEpisodeModel.ActualEndDate.Should().Be(priceEpisode.ActualEndDate);
                priceEpisodeModel.AgreedPrice.Should().Be(priceEpisode.AgreedPrice);
                priceEpisodeModel.Completed.Should().Be(priceEpisode.Completed);
                priceEpisodeModel.CompletionAmount.Should().Be(priceEpisode.CompletionAmount);
                priceEpisodeModel.CompletionHoldBackExemptionCode.Should().Be(priceEpisode.CompletionHoldBackExemptionCode);
                priceEpisodeModel.CourseStartDate.Should().Be(priceEpisode.CourseStartDate);
                priceEpisodeModel.EarningEventId.Should().Be(earningEvent.EventId);
                priceEpisodeModel.EffectiveTotalNegotiatedPriceStartDate.Should().Be(priceEpisode.EffectiveTotalNegotiatedPriceStartDate);
                priceEpisodeModel.EmployerContribution.Should().Be(priceEpisode.EmployerContribution);
                priceEpisodeModel.InstalmentAmount.Should().Be(priceEpisode.InstalmentAmount);
                priceEpisodeModel.NumberOfInstalments.Should().Be(priceEpisode.NumberOfInstalments);
                priceEpisodeModel.PlannedEndDate.Should().Be(priceEpisode.PlannedEndDate);
                priceEpisodeModel.SfaContributionPercentage.Should().Be(priceEpisode.EmployerContribution);
                priceEpisodeModel.StartDate.Should().Be(priceEpisode.StartDate);
                priceEpisodeModel.TotalNegotiatedPrice1.Should().Be(priceEpisode.TotalNegotiatedPrice1);
                priceEpisodeModel.TotalNegotiatedPrice2.Should().Be(priceEpisode.TotalNegotiatedPrice2);
                priceEpisodeModel.TotalNegotiatedPrice3.Should().Be(priceEpisode.TotalNegotiatedPrice3);
                priceEpisodeModel.TotalNegotiatedPrice4.Should().Be(priceEpisode.TotalNegotiatedPrice4);
            }
        }
コード例 #2
0
 private void CompareCourseDetails(EarningEvents.Messages.Events.EarningEvent earningEvent,
                                   EarningEventModel earningEventModel)
 {
     earningEventModel.LearningStartDate.Should().Be(earningEvent.LearningAim.StartDate);
     earningEventModel.LearningAimSequenceNumber.Should().Be(earningEvent.LearningAim?.SequenceNumber);
     earningEventModel.LearningAimFrameworkCode.Should().Be(earningEvent.LearningAim.FrameworkCode);
     earningEventModel.LearningAimPathwayCode.Should().Be(earningEvent.LearningAim.PathwayCode);
     earningEventModel.LearningAimProgrammeType.Should().Be(earningEvent.LearningAim.ProgrammeType);
     earningEventModel.LearningAimStandardCode.Should().Be(earningEvent.LearningAim.StandardCode);
     earningEventModel.LearningAimReference.Should().Be(earningEvent.LearningAim.Reference);
     earningEventModel.LearningAimFundingLineType.Should().Be(earningEvent.PriceEpisodes.Single(x => x.LearningAimSequenceNumber == earningEvent.LearningAim.SequenceNumber).FundingLineType);
 }
コード例 #3
0
 private void CompareCommonProperties(EarningEvents.Messages.Events.EarningEvent earningEvent, EarningEventModel earningEventModel)
 {
     earningEventModel.EventId.Should().Be(earningEvent.EventId);
     earningEventModel.EventTime.Should().Be(earningEvent.EventTime);
     earningEventModel.JobId.Should().Be(earningEvent.JobId);
     earningEventModel.IlrFileName.Should().Be(earningEvent.IlrFileName);
     earningEventModel.IlrSubmissionDateTime.Should().Be(earningEvent.IlrSubmissionDateTime);
     earningEventModel.AcademicYear.Should().Be(earningEvent.CollectionPeriod.AcademicYear);
     earningEventModel.CollectionPeriod.Should().Be(earningEvent.CollectionPeriod.Period);
     CompareCourseDetails(earningEvent, earningEventModel);
     CompareLearnerDetails(earningEvent, earningEventModel);
 }
コード例 #4
0
 private void CompareLearnerDetails(EarningEvents.Messages.Events.EarningEvent earningEvent, EarningEventModel earningEventModel)
 {
     earningEventModel.LearnerReferenceNumber.Should().Be(earningEvent.Learner.ReferenceNumber);
     earningEventModel.LearnerUln.Should().Be(earningEvent.Learner.Uln);
 }