public void BuildLARSStandardFunding() { var larsStandardFunding = new LARSStandardFunding { FundableWithoutEmployer = "Fundable", EffectiveFrom = new DateTime(2020, 1, 1), EffectiveTo = new DateTime(2020, 1, 1), AchievementIncentive = 1, SixteenToEighteenIncentive = 2, CoreGovContributionCap = 1.0m, SmallBusinessIncentive = 2.0m }; var dataEntity = NewService().BuildLARSStandardFunding(larsStandardFunding); dataEntity.EntityName.Should().Be("LARS_StandardFunding"); dataEntity.Attributes.Should().HaveCount(7); dataEntity.Attributes["FundableWithoutEmployer"].Value.Should().Be(larsStandardFunding.FundableWithoutEmployer); dataEntity.Attributes["SF1618Incentive"].Value.Should().Be(larsStandardFunding.SixteenToEighteenIncentive); dataEntity.Attributes["SFAchIncentive"].Value.Should().Be(larsStandardFunding.AchievementIncentive); dataEntity.Attributes["SFCoreGovContCap"].Value.Should().Be(larsStandardFunding.CoreGovContributionCap); dataEntity.Attributes["SFEffectiveFromDate"].Value.Should().Be(larsStandardFunding.EffectiveFrom); dataEntity.Attributes["SFEffectiveToDate"].Value.Should().Be(larsStandardFunding.EffectiveTo); dataEntity.Attributes["SFSmallBusIncentive"].Value.Should().Be(larsStandardFunding.SmallBusinessIncentive); }
public IDataEntity BuildLARSStandardFunding(LARSStandardFunding larsStdFunding) { return(new DataEntity(Attributes.EntityLearningDeliveryLARS_StandardFunding) { Attributes = new Dictionary <string, IAttributeData>() { { Attributes.SFFundableWithoutEmployer, new AttributeData(larsStdFunding.FundableWithoutEmployer) }, { Attributes.SF1618Incentive, new AttributeData(larsStdFunding.SixteenToEighteenIncentive) }, { Attributes.SFAchIncentive, new AttributeData(larsStdFunding.AchievementIncentive) }, { Attributes.SFCoreGovContCap, new AttributeData(larsStdFunding.CoreGovContributionCap) }, { Attributes.SFEffectiveFromDate, new AttributeData(larsStdFunding.EffectiveFrom) }, { Attributes.SFEffectiveToDate, new AttributeData(larsStdFunding.EffectiveTo) }, { Attributes.SFSmallBusIncentive, new AttributeData(larsStdFunding.SmallBusinessIncentive) }, } }); }
private Data.External.LARS.Model.LARSStandardFunding LARSStandardFundingFromEntity(LARSStandardFunding entity) { return(new Data.External.LARS.Model.LARSStandardFunding() { FundingCategory = entity.FundingCategory, EffectiveFrom = entity.EffectiveFrom, EffectiveTo = entity.EffectiveTo, AchievementIncentive = entity.AchievementIncentive, BandNumber = entity.BandNumber, CoreGovContributionCap = entity.CoreGovContributionCap, FundableWithoutEmployer = entity.FundableWithoutEmployer, SixteenToEighteenIncentive = entity.SixteenToEighteenIncentive, SmallBusinessIncentive = entity.SmallBusinessIncentive }); }