예제 #1
0
 private Data.External.LARS.Model.LARSFunding LARSFundingFromEntity(LARSFunding entity)
 {
     return(new Data.External.LARS.Model.LARSFunding
     {
         FundingCategory = entity.FundingCategory,
         EffectiveFrom = entity.EffectiveFrom,
         EffectiveTo = entity.EffectiveTo,
         RateWeighted = entity.RateWeighted,
         WeightingFactor = entity.WeightingFactor,
         RateUnWeighted = entity.RateUnWeighted
     });
 }
예제 #2
0
 public IDataEntity BuildLARSFunding(LARSFunding larsFunding)
 {
     return(new DataEntity(Attributes.EntityLearningDeliveryLARSFunding)
     {
         Attributes = new Dictionary <string, IAttributeData>()
         {
             { Attributes.LARSFundingCategory, new AttributeData(larsFunding.FundingCategory) },
             { Attributes.LARSFundingEffectiveFrom, new AttributeData(larsFunding.EffectiveFrom) },
             { Attributes.LARSFundingEffectiveTo, new AttributeData(larsFunding.EffectiveTo) },
             { Attributes.LARSFundingWeightedRate, new AttributeData(larsFunding.RateWeighted) },
         }
     });
 }
예제 #3
0
        public void BuildLARSFunding()
        {
            var larsFunding = new LARSFunding
            {
                FundingCategory = "FundingCategory",
                EffectiveFrom   = new DateTime(2019, 1, 1),
                EffectiveTo     = new DateTime(2020, 1, 1),
                RateWeighted    = 1.0m,
                WeightingFactor = "G"
            };

            var dataEntity = NewService().BuildLARSFunding(larsFunding);

            dataEntity.EntityName.Should().Be("LearningDeliveryLARS_Funding");
            dataEntity.Attributes.Should().HaveCount(4);
            dataEntity.Attributes["LARSFundCategory"].Value.Should().Be(larsFunding.FundingCategory);
            dataEntity.Attributes["LARSFundEffectiveFrom"].Value.Should().Be(larsFunding.EffectiveFrom);
            dataEntity.Attributes["LARSFundEffectiveTo"].Value.Should().Be(larsFunding.EffectiveTo);
            dataEntity.Attributes["LARSFundWeightedRate"].Value.Should().Be(larsFunding.RateWeighted);
        }