コード例 #1
0
        public void AddPriceEpisode(PriceEpisode priceEpisode)
        {
            var priceEpisodes = PriceEpisodes?.ToList() ?? new List <PriceEpisode>();

            priceEpisodes.Add(priceEpisode);

            PriceEpisodes = priceEpisodes.ToArray();
        }
        public void ThereShouldBe_NoMixingOfPeriodsBetweenPriceEpisodes()
        {
            var sut = new MatchedLearnerDtoMapper();

            var actual = sut.Map(_testInput);

            var firstEvent = actual.Training.FirstOrDefault(x => x.PathwayCode == 1);

            firstEvent !.PriceEpisodes.SelectMany(x => x.Periods).Should().HaveCount(2);
            firstEvent.PriceEpisodes.SelectMany(x => x.Periods).Should().ContainEquivalentOf(new { Period = 2 });
            firstEvent.PriceEpisodes.SelectMany(x => x.Periods).Should().ContainEquivalentOf(new { Period = 1 });
        }
コード例 #3
0
 public IntermediateLearningAim(
     ProcessLearnerCommand command,
     IEnumerable <PriceEpisode> priceEpisodes,
     LearningDelivery aim)
 {
     Aim = aim;
     PriceEpisodes.AddRange(FilterPriceEpisodes(priceEpisodes, command.CollectionYear));
     Learner               = command.Learner;
     Ukprn                 = command.Ukprn;
     AcademicYear          = command.CollectionYear;
     CollectionPeriod      = command.CollectionPeriod;
     IlrSubmissionDateTime = command.IlrSubmissionDateTime;
     IlrFileName           = command.IlrFileName;
     JobId                 = command.JobId;
 }
コード例 #4
0
 protected IntermediateLearningAim(
     FM36Learner learner,
     LearningDelivery aim,
     IEnumerable <PriceEpisode> priceEpisodes,
     long ukprn,
     short collectionYear,
     int collectionPeriod,
     DateTime ilrSubmissionDateTime,
     string ilrFileName,
     long jobId)
 {
     Aim     = aim;
     Learner = learner;
     PriceEpisodes.AddRange(FilterPriceEpisodes(priceEpisodes, collectionYear));
     Ukprn                 = ukprn;
     AcademicYear          = collectionYear;
     CollectionPeriod      = collectionPeriod;
     IlrSubmissionDateTime = ilrSubmissionDateTime;
     IlrFileName           = ilrFileName;
     JobId                 = jobId;
 }