public IDataEntity BuildApprenticeshipsEarningsHistory(AECEarningsHistory aecEarningsHistory)
 {
     return(new DataEntity(Attributes.EntityHistoricEarningInput)
     {
         Attributes = new Dictionary <string, IAttributeData>()
         {
             { Attributes.AppIdentifierInput, new AttributeData(aecEarningsHistory.AppIdentifier) },
             { Attributes.AppProgCompletedInTheYearInput, new AttributeData(aecEarningsHistory.AppProgCompletedInTheYearInput) },
             { Attributes.HistoricCollectionReturnInput, new AttributeData(aecEarningsHistory.CollectionReturnCode) },
             { Attributes.HistoricCollectionYearInput, new AttributeData(aecEarningsHistory.CollectionYear) },
             { Attributes.HistoricDaysInYearInput, new AttributeData(aecEarningsHistory.DaysInYear) },
             { Attributes.HistoricEffectiveTNPStartDateInput, new AttributeData(aecEarningsHistory.HistoricEffectiveTNPStartDateInput) },
             { Attributes.HistoricEmpIdStartWithinYearInput, new AttributeData(aecEarningsHistory.HistoricEmpIdStartWithinYear) },
             { Attributes.HistoricEmpIdEndWithinYearInput, new AttributeData(aecEarningsHistory.HistoricEmpIdEndWithinYear) },
             { Attributes.HistoricFworkCodeInput, new AttributeData(aecEarningsHistory.FworkCode) },
             { Attributes.HistoricLearnDelProgEarliestACT2DateInput, new AttributeData(aecEarningsHistory.HistoricLearnDelProgEarliestACT2DateInput) },
             { Attributes.HistoricLearner1618AtStartInput, new AttributeData(aecEarningsHistory.HistoricLearner1618StartInput) },
             { Attributes.HistoricLearnRefNumberInput, new AttributeData(aecEarningsHistory.LearnRefNumber) },
             { Attributes.HistoricPMRAmountInput, new AttributeData(aecEarningsHistory.HistoricPMRAmount) },
             { Attributes.HistoricProgrammeStartDateIgnorePathwayInput, new AttributeData(aecEarningsHistory.ProgrammeStartDateIgnorePathway) },
             { Attributes.HistoricProgrammeStartDateMatchPathwayInput, new AttributeData(aecEarningsHistory.ProgrammeStartDateMatchPathway) },
             { Attributes.HistoricProgTypeInput, new AttributeData(aecEarningsHistory.ProgType) },
             { Attributes.HistoricPwayCodeInput, new AttributeData(aecEarningsHistory.PwayCode) },
             { Attributes.HistoricTotalProgAimPaymentsInTheYearInput, new AttributeData(aecEarningsHistory.TotalProgAimPaymentsInTheYear) },
             { Attributes.HistoricTotal1618UpliftPaymentsInTheYearInput, new AttributeData(aecEarningsHistory.HistoricTotal1618UpliftPaymentsInTheYearInput) },
             { Attributes.HistoricSTDCodeInput, new AttributeData(aecEarningsHistory.STDCode) },
             { Attributes.HistoricTNP1Input, new AttributeData(aecEarningsHistory.HistoricTNP1Input) },
             { Attributes.HistoricTNP2Input, new AttributeData(aecEarningsHistory.HistoricTNP2Input) },
             { Attributes.HistoricTNP3Input, new AttributeData(aecEarningsHistory.HistoricTNP3Input) },
             { Attributes.HistoricTNP4Input, new AttributeData(aecEarningsHistory.HistoricTNP4Input) },
             { Attributes.HistoricUKPRNInput, new AttributeData(aecEarningsHistory.UKPRN) },
             { Attributes.HistoricULNInput, new AttributeData(aecEarningsHistory.ULN) },
             { Attributes.HistoricUptoEndDateInput, new AttributeData(aecEarningsHistory.UptoEndDate) },
             { Attributes.HistoricVirtualTNP3EndofTheYearInput, new AttributeData(aecEarningsHistory.HistoricVirtualTNP3EndOfTheYearInput) },
             { Attributes.HistoricVirtualTNP4EndofTheYearInput, new AttributeData(aecEarningsHistory.HistoricVirtualTNP4EndOfTheYearInput) }
         }
     });
 }
示例#2
0
        public void BuildApprenticeshipsEarningsHistory()
        {
            var appsHistory = new AECEarningsHistory
            {
                AppIdentifier = "AppIdentifierInput",
                AppProgCompletedInTheYearInput = false,
                DaysInYear           = 1,
                CollectionReturnCode = "1",
                CollectionYear       = "2021",
                HistoricEffectiveTNPStartDateInput = new DateTime(2019, 8, 1),
                HistoricEmpIdEndWithinYear         = 2,
                HistoricEmpIdStartWithinYear       = 3,
                FworkCode = 4,
                HistoricLearner1618StartInput   = false,
                HistoricPMRAmount               = 1.0m,
                ProgrammeStartDateIgnorePathway = new DateTime(2019, 8, 1),
                ProgrammeStartDateMatchPathway  = new DateTime(2019, 8, 1),
                ProgType          = 5,
                PwayCode          = 6,
                STDCode           = 7,
                HistoricTNP1Input = 1.0m,
                HistoricTNP2Input = 1.0m,
                HistoricTNP3Input = 1.0m,
                HistoricTNP4Input = 1.0m,
                HistoricTotal1618UpliftPaymentsInTheYearInput = 1.0m,
                TotalProgAimPaymentsInTheYear = 1.0m,
                ULN         = 1234567890,
                UKPRN       = 12345678,
                UptoEndDate = new DateTime(2019, 8, 1),
                HistoricVirtualTNP3EndOfTheYearInput      = 1.0m,
                HistoricVirtualTNP4EndOfTheYearInput      = 1.0m,
                HistoricLearnDelProgEarliestACT2DateInput = new DateTime(2019, 8, 1),
            };

            var dataEntity = NewService().BuildApprenticeshipsEarningsHistory(appsHistory);

            dataEntity.EntityName.Should().Be("HistoricEarningInput");
            dataEntity.Attributes.Should().HaveCount(29);
            dataEntity.Attributes["AppIdentifierInput"].Value.Should().Be(appsHistory.AppIdentifier);
            dataEntity.Attributes["AppProgCompletedInTheYearInput"].Value.Should().Be(appsHistory.AppProgCompletedInTheYearInput);
            dataEntity.Attributes["HistoricCollectionReturnInput"].Value.Should().Be(appsHistory.CollectionReturnCode);
            dataEntity.Attributes["HistoricCollectionYearInput"].Value.Should().Be(appsHistory.CollectionYear);
            dataEntity.Attributes["HistoricDaysInYearInput"].Value.Should().Be(appsHistory.DaysInYear);
            dataEntity.Attributes["HistoricEffectiveTNPStartDateInput"].Value.Should().Be(appsHistory.HistoricEffectiveTNPStartDateInput);
            dataEntity.Attributes["HistoricEmpIdEndWithinYearInput"].Value.Should().Be(appsHistory.HistoricEmpIdEndWithinYear);
            dataEntity.Attributes["HistoricEmpIdStartWithinYearInput"].Value.Should().Be(appsHistory.HistoricEmpIdStartWithinYear);
            dataEntity.Attributes["HistoricFworkCodeInput"].Value.Should().Be(appsHistory.FworkCode);
            dataEntity.Attributes["HistoricLearnDelProgEarliestACT2DateInput"].Value.Should().Be(appsHistory.HistoricLearnDelProgEarliestACT2DateInput);
            dataEntity.Attributes["HistoricLearner1618AtStartInput"].Value.Should().Be(appsHistory.HistoricLearner1618StartInput);
            dataEntity.Attributes["HistoricPMRAmountInput"].Value.Should().Be(appsHistory.HistoricPMRAmount);
            dataEntity.Attributes["HistoricProgrammeStartDateIgnorePathwayInput"].Value.Should().Be(appsHistory.ProgrammeStartDateIgnorePathway);
            dataEntity.Attributes["HistoricProgrammeStartDateMatchPathwayInput"].Value.Should().Be(appsHistory.ProgrammeStartDateMatchPathway);
            dataEntity.Attributes["HistoricProgTypeInput"].Value.Should().Be(appsHistory.ProgType);
            dataEntity.Attributes["HistoricPwayCodeInput"].Value.Should().Be(appsHistory.PwayCode);
            dataEntity.Attributes["HistoricTotal1618UpliftPaymentsInTheYearInput"].Value.Should().Be(appsHistory.HistoricTotal1618UpliftPaymentsInTheYearInput);
            dataEntity.Attributes["HistoricTotalProgAimPaymentsInTheYearInput"].Value.Should().Be(appsHistory.TotalProgAimPaymentsInTheYear);
            dataEntity.Attributes["HistoricSTDCodeInput"].Value.Should().Be(appsHistory.STDCode);
            dataEntity.Attributes["HistoricTNP1Input"].Value.Should().Be(appsHistory.HistoricTNP1Input);
            dataEntity.Attributes["HistoricTNP2Input"].Value.Should().Be(appsHistory.HistoricTNP2Input);
            dataEntity.Attributes["HistoricTNP3Input"].Value.Should().Be(appsHistory.HistoricTNP3Input);
            dataEntity.Attributes["HistoricTNP4Input"].Value.Should().Be(appsHistory.HistoricTNP4Input);
            dataEntity.Attributes["HistoricUKPRNInput"].Value.Should().Be(appsHistory.UKPRN);
            dataEntity.Attributes["HistoricULNInput"].Value.Should().Be(appsHistory.ULN);
            dataEntity.Attributes["HistoricUptoEndDateInput"].Value.Should().Be(appsHistory.UptoEndDate);
            dataEntity.Attributes["HistoricVirtualTNP3EndofTheYearInput"].Value.Should().Be(appsHistory.HistoricVirtualTNP3EndOfTheYearInput);
            dataEntity.Attributes["HistoricVirtualTNP4EndofTheYearInput"].Value.Should().Be(appsHistory.HistoricVirtualTNP4EndOfTheYearInput);
        }