public void BuildLARSStandardApprenticeshipFunding() { var larsSAP = new LARSStandardApprenticeshipFunding { SixteenToEighteenEmployerAdditionalPayment = 1.0m, SixteenToEighteenProviderAdditionalPayment = 2.0m, SixteenToEighteenFrameworkUplift = 3.0m, CareLeaverAdditionalPayment = 4.0m, EffectiveFrom = new DateTime(2019, 8, 1), FundingCategory = "Type", MaxEmployerLevyCap = 5.0m, ReservedValue2 = 6.0m, ReservedValue3 = 7.0m }; var dataEntity = NewService().BuildLARSStandardApprenticeshipFunding(larsSAP); dataEntity.EntityName.Should().Be("Standard_LARS_ApprenticshipFunding"); dataEntity.Attributes.Should().HaveCount(10); dataEntity.Attributes["StandardAF1618EmployerAdditionalPayment"].Value.Should().Be(larsSAP.SixteenToEighteenEmployerAdditionalPayment); dataEntity.Attributes["StandardAF1618ProviderAdditionalPayment"].Value.Should().Be(larsSAP.SixteenToEighteenProviderAdditionalPayment); dataEntity.Attributes["StandardAF1618FrameworkUplift"].Value.Should().Be(larsSAP.SixteenToEighteenFrameworkUplift); dataEntity.Attributes["StandardAFCareLeaverAdditionalPayment"].Value.Should().Be(larsSAP.CareLeaverAdditionalPayment); dataEntity.Attributes["StandardAFEffectiveFrom"].Value.Should().Be(larsSAP.EffectiveFrom); dataEntity.Attributes["StandardAFEffectiveTo"].Value.Should().Be(larsSAP.EffectiveTo); dataEntity.Attributes["StandardAFFundingCategory"].Value.Should().Be(larsSAP.FundingCategory); dataEntity.Attributes["StandardAFMaxEmployerLevyCap"].Value.Should().Be(larsSAP.MaxEmployerLevyCap); dataEntity.Attributes["StandardAFReservedValue2"].Value.Should().Be(larsSAP.ReservedValue2); dataEntity.Attributes["StandardAFReservedValue3"].Value.Should().Be(larsSAP.ReservedValue3); }
public IDataEntity BuildLARSStandardApprenticeshipFunding(LARSStandardApprenticeshipFunding larsStandardApprenticeshipFunding) { return(new DataEntity(Attributes.EntityStandardLARSApprenticshipFunding) { Attributes = new Dictionary <string, IAttributeData>() { { Attributes.StandardAF1618EmployerAdditionalPayment, new AttributeData(larsStandardApprenticeshipFunding.SixteenToEighteenEmployerAdditionalPayment) }, { Attributes.StandardAF1618ProviderAdditionalPayment, new AttributeData(larsStandardApprenticeshipFunding.SixteenToEighteenProviderAdditionalPayment) }, { Attributes.StandardAF1618FrameworkUplift, new AttributeData(larsStandardApprenticeshipFunding.SixteenToEighteenFrameworkUplift) }, { Attributes.StandardAFCareLeaverAdditionalPayment, new AttributeData(larsStandardApprenticeshipFunding.CareLeaverAdditionalPayment) }, { Attributes.StandardAFEffectiveFrom, new AttributeData(larsStandardApprenticeshipFunding.EffectiveFrom) }, { Attributes.StandardAFEffectiveTo, new AttributeData(larsStandardApprenticeshipFunding.EffectiveTo) }, { Attributes.StandardAFFundingCategory, new AttributeData(larsStandardApprenticeshipFunding.FundingCategory) }, { Attributes.StandardAFMaxEmployerLevyCap, new AttributeData(larsStandardApprenticeshipFunding.MaxEmployerLevyCap) }, { Attributes.StandardAFReservedValue2, new AttributeData(larsStandardApprenticeshipFunding.ReservedValue2) }, { Attributes.StandardAFReservedValue3, new AttributeData(larsStandardApprenticeshipFunding.ReservedValue3) } } }); }
private Data.External.LARS.Model.LARSStandardApprenticeshipFunding LARSStandardApprenticeshipFundingFromEntity(LARSStandardApprenticeshipFunding entity) { return(new Data.External.LARS.Model.LARSStandardApprenticeshipFunding { BandNumber = entity.BandNumber, CareLeaverAdditionalPayment = entity.CareLeaverAdditionalPayment, ProgType = entity.ProgType, PwayCode = entity.PwayCode, FundingCategory = entity.FundingCategory, EffectiveFrom = entity.EffectiveFrom, EffectiveTo = entity.EffectiveTo, CoreGovContributionCap = entity.CoreGovContributionCap, SixteenToEighteenIncentive = entity.SixteenToEighteenIncentive, SixteenToEighteenProviderAdditionalPayment = entity.SixteenToEighteenProviderAdditionalPayment, SixteenToEighteenEmployerAdditionalPayment = entity.SixteenToEighteenEmployerAdditionalPayment, SixteenToEighteenFrameworkUplift = entity.SixteenToEighteenFrameworkUplift, Duration = entity.Duration, ReservedValue2 = entity.ReservedValue2, ReservedValue3 = entity.ReservedValue3, MaxEmployerLevyCap = entity.MaxEmployerLevyCap, FundableWithoutEmployer = entity.FundableWithoutEmployer }); }