public IDataEntity BuildLARSCareerLearningPilot(LARSCareerLearningPilot larsCareerLearningPilot)
 {
     return(new DataEntity(Attributes.EntityLearningDeliveryLARS_CareerLearningPilot)
     {
         Attributes = new Dictionary <string, IAttributeData>()
         {
             { Attributes.LearnDelLARSCarPilFundAreaCode, new AttributeData(larsCareerLearningPilot.AreaCode) },
             { Attributes.LearnDelLARSCarPilFundEffFromDate, new AttributeData(larsCareerLearningPilot.EffectiveFrom) },
             { Attributes.LearnDelLARSCarPilFundEffToDate, new AttributeData(larsCareerLearningPilot.EffectiveTo) },
             { Attributes.LearnDelLARSCarPilFundSubsidyRate, new AttributeData(larsCareerLearningPilot.SubsidyRate) },
         }
     });
 }
        public void BuildLARSCareerLearningPilot()
        {
            var larsCareerLearningPilot = new LARSCareerLearningPilot
            {
                AreaCode      = "AreaCode",
                EffectiveFrom = new DateTime(2018, 1, 1),
                EffectiveTo   = new DateTime(2019, 1, 1),
                SubsidyRate   = 1.0m
            };

            var dataEntity = NewService().BuildLARSCareerLearningPilot(larsCareerLearningPilot);

            dataEntity.EntityName.Should().Be("LARS_CareerLearningPilot");
            dataEntity.Attributes.Should().HaveCount(4);
            dataEntity.Attributes["LearnDelLARSCarPilFundAreaCode"].Value.Should().Be(larsCareerLearningPilot.AreaCode);
            dataEntity.Attributes["LearnDelLARSCarPilFundEffFromDate"].Value.Should().Be(larsCareerLearningPilot.EffectiveFrom);
            dataEntity.Attributes["LearnDelLARSCarPilFundEffToDate"].Value.Should().Be(larsCareerLearningPilot.EffectiveTo);
            dataEntity.Attributes["LearnDelLARSCarPilFundSubsidyRate"].Value.Should().Be(larsCareerLearningPilot.SubsidyRate);
        }