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 }); }
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; }
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; }