diff --git a/src/SFA.DAS.Payments.RequiredPayments.Application.UnitTests/Application/Mapping/RequiredPaymentMappingTests.cs b/src/SFA.DAS.Payments.RequiredPayments.Application.UnitTests/Application/Mapping/RequiredPaymentMappingTests.cs index 6afd6ef32..32f873089 100644 --- a/src/SFA.DAS.Payments.RequiredPayments.Application.UnitTests/Application/Mapping/RequiredPaymentMappingTests.cs +++ b/src/SFA.DAS.Payments.RequiredPayments.Application.UnitTests/Application/Mapping/RequiredPaymentMappingTests.cs @@ -1,9 +1,13 @@ using System; +using System.Collections.Generic; +using System.Diagnostics; using AutoMapper; using FluentAssertions; using NUnit.Framework; using SFA.DAS.Payments.DataLocks.Messages.Events; +using SFA.DAS.Payments.Model.Core; using SFA.DAS.Payments.RequiredPayments.Application.Mapping; +using SFA.DAS.Payments.RequiredPayments.Application.UnitTests.TestHelpers; using SFA.DAS.Payments.RequiredPayments.Domain.Entities; using SFA.DAS.Payments.RequiredPayments.Messages.Events; @@ -64,7 +68,16 @@ public void Maps_AgeAtStartOfLearning_From_PayableEarningEvent_To_CalculatedRequ // Arrange var payableEarningEvent = new PayableEarningEvent { - AgeAtStartOfLearning = 25 + AgeAtStartOfLearning = 25, + LearningAim = EarningEventDataHelper.CreateLearningAim(), + PriceEpisodes = new List + { + new PriceEpisode + { + LearningAimSequenceNumber = 1, + Identifier = "1" + } + } }; var requiredPaymentEvent = Activator.CreateInstance(typeof(CalculatedRequiredCoInvestedAmount)) as CalculatedRequiredOnProgrammeAmount; diff --git a/src/SFA.DAS.Payments.RequiredPayments.Application/Mapping/RequiredPaymentsProfile.cs b/src/SFA.DAS.Payments.RequiredPayments.Application/Mapping/RequiredPaymentsProfile.cs index 4f8eadca2..173663ccc 100644 --- a/src/SFA.DAS.Payments.RequiredPayments.Application/Mapping/RequiredPaymentsProfile.cs +++ b/src/SFA.DAS.Payments.RequiredPayments.Application/Mapping/RequiredPaymentsProfile.cs @@ -181,7 +181,7 @@ public RequiredPaymentsProfile() .ForMember(x => x.EarningEventId, opt => opt.MapFrom(source => source.EarningEventId)) .ForMember(x => x.ContractType, opt => opt.UseValue(ContractType.Act1)) .ForMember(x => x.AgeAtStartOfLearning, opt => opt.MapFrom(source => source.AgeAtStartOfLearning)) - .ForMember(x => x.LearningStartDate, opt => opt.Ignore()); + ; CreateMap()