コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DerivedData_21Rule"/> class.
        /// </summary>
        /// <param name="commonOperations">The common operations.</param>
        public DerivedData_21Rule(IProvideRuleCommonOperations commonOperations)
        {
            It.IsNull(commonOperations)
            .AsGuard <ArgumentNullException>(nameof(commonOperations));

            _check = commonOperations;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UKPRN_08Rule"/> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="fileDataService">The file data service.</param>
        /// <param name="academicYearDataService">The academic year data service.</param>
        /// <param name="commonOperations">The common operations.</param>
        /// <param name="fcsDataService">The FCS data service.</param>
        public UKPRN_08Rule(
            IValidationErrorHandler validationErrorHandler,
            IFileDataService fileDataService,
            IAcademicYearDataService academicYearDataService,
            IProvideRuleCommonOperations commonOperations,
            IFCSDataService fcsDataService)
            : base(validationErrorHandler, RuleNameConstants.UKPRN_08)
        {
            // this check should be in the base class
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));

            It.IsNull(fileDataService)
            .AsGuard <ArgumentNullException>(nameof(fileDataService));
            It.IsNull(academicYearDataService)
            .AsGuard <ArgumentNullException>(nameof(academicYearDataService));
            It.IsNull(commonOperations)
            .AsGuard <ArgumentNullException>(nameof(commonOperations));
            It.IsNull(fcsDataService)
            .AsGuard <ArgumentNullException>(nameof(fcsDataService));

            _fileDataService         = fileDataService;
            _academicYearDataService = academicYearDataService;
            _check          = commonOperations;
            _fcsDataService = fcsDataService;
        }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DelLocPostCode_18Rule" /> class.
 /// </summary>
 /// <param name="validationErrorHandler">The validation error handler.</param>
 /// <param name="commonChecks">The common checks.</param>
 /// <param name="fcsData">The FCS data.</param>
 /// <param name="postcodesData">The postcodes data.</param>
 /// <param name="derivedData22">The derived data22.</param>
 public DelLocPostCode_18Rule(
     IValidationErrorHandler validationErrorHandler,
     IProvideRuleCommonOperations commonChecks,
     IFCSDataService fcsData,
     IPostcodesDataService postcodesData)
     : base(validationErrorHandler, commonChecks, fcsData, postcodesData, RuleNameConstants.DelLocPostCode_18)
 {
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="LearnAimRef_87Rule" /> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="commonChecks">The common checks.</param>
        public LearnAimRef_87Rule(
            IValidationErrorHandler validationErrorHandler,
            IProvideRuleCommonOperations commonChecks)
        {
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));
            It.IsNull(commonChecks)
            .AsGuard <ArgumentNullException>(nameof(commonChecks));

            _messageHandler = validationErrorHandler;
            _check          = commonChecks;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="EmpStat_18Rule" /> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="commonOperations">The common operations.</param>
        public EmpStat_18Rule(
            IValidationErrorHandler validationErrorHandler,
            IProvideRuleCommonOperations commonOperations)
            : base(validationErrorHandler, RuleNameConstants.EmpStat_18)
        {
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));
            It.IsNull(commonOperations)
            .AsGuard <ArgumentNullException>(nameof(commonOperations));

            _check = commonOperations;
        }
コード例 #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ESMType_09Rule" /> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="commonOperations">The common operations.</param>
        /// <param name="derivedData07">The derived data 07.</param>
        public ESMType_09Rule(
            IValidationErrorHandler validationErrorHandler,
            IProvideRuleCommonOperations commonOperations)
        {
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));
            It.IsNull(commonOperations)
            .AsGuard <ArgumentNullException>(nameof(commonOperations));

            _messageHandler = validationErrorHandler;
            _check          = commonOperations;
        }
コード例 #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LearnDelFAMType_09Rule" /> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="commonOperations">The common operations.</param>
        public LearnDelFAMType_09Rule(
            IValidationErrorHandler validationErrorHandler,
            IProvideRuleCommonOperations commonOperations)
            : base(validationErrorHandler, RuleNameConstants.LearnDelFAMType_09)
        {
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));
            It.IsNull(commonOperations)
            .AsGuard <ArgumentNullException>(nameof(commonOperations));

            _check = commonOperations;
        }
コード例 #8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PCTLDCS_01Rule" /> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="larsData">The lars data.</param>
        /// <param name="commonChecks">The common rule (operations provider).</param>
        public PCTLDCS_01Rule(
            IValidationErrorHandler validationErrorHandler,
            ILARSDataService larsData,
            IProvideRuleCommonOperations commonChecks)
            : base(validationErrorHandler, RuleNameConstants.PCTLDCS_01)
        {
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));
            It.IsNull(larsData)
            .AsGuard <ArgumentNullException>(nameof(larsData));
            It.IsNull(commonChecks)
            .AsGuard <ArgumentNullException>(nameof(commonChecks));

            _larsData = larsData;
            _check    = commonChecks;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="EmpStat_14Rule" /> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="derivedData22">The derived data 22 rule.</param>
        /// <param name="fcsData">The year data.</param>
        /// <param name="commonOperations">The common operations.</param>
        public EmpStat_14Rule(
            IValidationErrorHandler validationErrorHandler,
            IFCSDataService fcsData,
            IProvideRuleCommonOperations commonOperations)
            : base(validationErrorHandler, RuleNameConstants.EmpStat_14)
        {
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));
            It.IsNull(fcsData)
            .AsGuard <ArgumentNullException>(nameof(fcsData));
            It.IsNull(commonOperations)
            .AsGuard <ArgumentNullException>(nameof(commonOperations));

            _fcsData = fcsData;
            _check   = commonOperations;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="LearnAimRef_81Rule" /> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="larsData">The lars data.</param>
        /// <param name="commonChecks">The common rule (operations provider).</param>
        public LearnAimRef_81Rule(
            IValidationErrorHandler validationErrorHandler,
            ILARSDataService larsData,
            IProvideRuleCommonOperations commonChecks)
        {
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));
            It.IsNull(larsData)
            .AsGuard <ArgumentNullException>(nameof(larsData));
            It.IsNull(commonChecks)
            .AsGuard <ArgumentNullException>(nameof(commonChecks));

            _messageHandler = validationErrorHandler;
            _larsData       = larsData;
            _check          = commonChecks;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="LearnStartDate_17Rule" /> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="larsData">The FCS data provider.</param>
        /// <param name="commonOperations">The common operations.</param>
        public LearnStartDate_17Rule(
            IValidationErrorHandler validationErrorHandler,
            ILARSDataService larsData,
            IProvideRuleCommonOperations commonOperations)
            : base(validationErrorHandler, RuleNameConstants.LearnStartDate_17)
        {
            // this check should be in the base class
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));
            It.IsNull(larsData)
            .AsGuard <ArgumentNullException>(nameof(larsData));
            It.IsNull(commonOperations)
            .AsGuard <ArgumentNullException>(nameof(commonOperations));

            _larsData = larsData;
            _check    = commonOperations;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="LearnStartDate_15Rule" /> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="derivedData22">The derived date18.</param>
        /// <param name="commonOperations">The common operations.</param>
        public LearnStartDate_15Rule(
            IValidationErrorHandler validationErrorHandler,
            IDerivedData_22Rule derivedData22,
            IProvideRuleCommonOperations commonOperations)
            : base(validationErrorHandler, RuleNameConstants.LearnStartDate_15)
        {
            // this check should be in the base class
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));
            It.IsNull(derivedData22)
            .AsGuard <ArgumentNullException>(nameof(derivedData22));
            It.IsNull(commonOperations)
            .AsGuard <ArgumentNullException>(nameof(commonOperations));

            _derivedData22 = derivedData22;
            _check         = commonOperations;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ESMType_14Rule" /> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="ddrule26">derived data rule 26.</param>
        /// <param name="fcsData">The lars data.</param>
        /// <param name="commonOperations">The common operations provider.</param>
        public ESMType_14Rule(
            IValidationErrorHandler validationErrorHandler,
            IDerivedData_26Rule ddrule26,
            IFCSDataService fcsData,
            IProvideRuleCommonOperations commonOperations)
            : base(validationErrorHandler, RuleNameConstants.ESMType_14)
        {
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));
            It.IsNull(ddrule26)
            .AsGuard <ArgumentNullException>(nameof(ddrule26));
            It.IsNull(fcsData)
            .AsGuard <ArgumentNullException>(nameof(fcsData));
            It.IsNull(commonOperations)
            .AsGuard <ArgumentNullException>(nameof(commonOperations));

            _ddrule26 = ddrule26;
            _fcsData  = fcsData;
            _check    = commonOperations;
        }
コード例 #14
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LearnStartDate_07Rule"/> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="derivedData07">The derived data07.</param>
        /// <param name="derivedData04">The derived data04.</param>
        /// <param name="larsData">The lars data.</param>
        /// <param name="commonOperations">The common operations.</param>
        public LearnStartDate_07Rule(
            IValidationErrorHandler validationErrorHandler,
            IDerivedData_04Rule derivedData04,
            ILARSDataService larsData,
            IProvideRuleCommonOperations commonOperations)
            : base(validationErrorHandler, RuleNameConstants.LearnStartDate_07)
        {
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));
            It.IsNull(derivedData04)
            .AsGuard <ArgumentNullException>(nameof(derivedData04));
            It.IsNull(larsData)
            .AsGuard <ArgumentNullException>(nameof(larsData));
            It.IsNull(commonOperations)
            .AsGuard <ArgumentNullException>(nameof(commonOperations));

            _derivedData04 = derivedData04;
            _larsData      = larsData;
            _check         = commonOperations;
        }
コード例 #15
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LearnStartDate_14Rule" /> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="larsData">The lars data.</param>
        /// <param name="derivedData18">The derived date18.</param>
        /// <param name="commonOperations">The common operations.</param>
        public LearnStartDate_14Rule(
            IValidationErrorHandler validationErrorHandler,
            ILARSDataService larsData,
            IDerivedData_18Rule derivedData18,
            IProvideRuleCommonOperations commonOperations)
            : base(validationErrorHandler, Name)
        {
            // this check should be in the base class
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));
            It.IsNull(larsData)
            .AsGuard <ArgumentNullException>(nameof(larsData));
            It.IsNull(derivedData18)
            .AsGuard <ArgumentNullException>(nameof(derivedData18));
            It.IsNull(commonOperations)
            .AsGuard <ArgumentNullException>(nameof(commonOperations));

            _larsData      = larsData;
            _derivedData18 = derivedData18;
            _check         = commonOperations;
        }
コード例 #16
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DelLocPostCode_EligibilityRule{TEligibilityItem}" /> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="commonChecks">The common checks.</param>
        /// <param name="fcsData">The FCS data.</param>
        /// <param name="postcodesData">The postcodes data.</param>
        /// <param name="ruleName">Name of the rule.</param>
        public DelLocPostCode_EligibilityRule(
            IValidationErrorHandler validationErrorHandler,
            IProvideRuleCommonOperations commonChecks,
            IFCSDataService fcsData,
            IPostcodesDataService postcodesData,
            string ruleName)
            : base(validationErrorHandler, ruleName)
        {
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));
            It.IsNull(commonChecks)
            .AsGuard <ArgumentNullException>(nameof(commonChecks));
            It.IsNull(fcsData)
            .AsGuard <ArgumentNullException>(nameof(fcsData));
            It.IsNull(postcodesData)
            .AsGuard <ArgumentNullException>(nameof(postcodesData));

            _check         = commonChecks;
            FcsData        = fcsData;
            _postcodesData = postcodesData;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="LearnAimRef_73Rule"/> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="commonOperations">The common operations.</param>
        /// <param name="fcsDataService">The fcs data service.</param>
        /// <param name="larsDataService">The lars data service.</param>
        public LearnAimRef_73Rule(
            IValidationErrorHandler validationErrorHandler,
            IProvideRuleCommonOperations commonOperations,
            IFCSDataService fcsDataService,
            ILARSDataService larsDataService)
            : base(validationErrorHandler, RuleNameConstants.LearnAimRef_73)
        {
            // this check should be in the base class
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));

            It.IsNull(commonOperations)
            .AsGuard <ArgumentNullException>(nameof(commonOperations));
            It.IsNull(fcsDataService)
            .AsGuard <ArgumentNullException>(nameof(fcsDataService));
            It.IsNull(larsDataService)
            .AsGuard <ArgumentNullException>(nameof(larsDataService));

            _fcsData  = fcsDataService;
            _larsData = larsDataService;
            _check    = commonOperations;
        }
コード例 #18
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LearnAimRef_78Rule" /> class.
        /// </summary>
        /// <param name="validationErrorHandler">The validation error handler.</param>
        /// <param name="larsData">The lars data.</param>
        /// <param name="commonChecks">The common checks.</param>
        /// <param name="fileData">The file data (service).</param>
        /// <param name="organisationData">The organisation data (service).</param>
        public LearnAimRef_78Rule(
            IValidationErrorHandler validationErrorHandler,
            ILARSDataService larsData,
            IProvideRuleCommonOperations commonChecks,
            IFileDataService fileData,
            IOrganisationDataService organisationData)
        {
            It.IsNull(validationErrorHandler)
            .AsGuard <ArgumentNullException>(nameof(validationErrorHandler));
            It.IsNull(larsData)
            .AsGuard <ArgumentNullException>(nameof(larsData));
            It.IsNull(commonChecks)
            .AsGuard <ArgumentNullException>(nameof(commonChecks));
            It.IsNull(fileData)
            .AsGuard <ArgumentNullException>(nameof(fileData));
            It.IsNull(organisationData)
            .AsGuard <ArgumentNullException>(nameof(organisationData));

            _messageHandler   = validationErrorHandler;
            _larsData         = larsData;
            _check            = commonChecks;
            _fileData         = fileData;
            _organisationData = organisationData;
        }
コード例 #19
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LearnAimRefRuleActionProvider " /> class.
        /// </summary>
        /// <param name="commonOperations">The common operations.</param>
        /// <param name="larsData">The lars data.</param>
        /// <param name="derivedData11">The derived data 11 (rule).</param>
        public LearnAimRefRuleActionProvider(
            IProvideRuleCommonOperations commonOperations,
            IDerivedData_11Rule derivedData11)
        {
            It.IsNull(commonOperations)
            .AsGuard <ArgumentNullException>(nameof(commonOperations));
            It.IsNull(derivedData11)
            .AsGuard <ArgumentNullException>(nameof(derivedData11));

            Check         = commonOperations;
            DerivedData11 = derivedData11;

            _branchActions = new Dictionary <int, IReadOnlyCollection <Func <ILearningDelivery, ILearner, BranchResult> > >
            {
                [TypeOfFunding.AdultSkills] = PackageRoutines(IsQualifyingCategoryOLASS, IsQualifyingCategoryUnemployed, IsQualifyingCategoryApprenticeship, IsQualifyingCategoryAdultSkills),
                [TypeOfFunding.ApprenticeshipsFrom1May2017] = PackageRoutines(IsQualifyingCategoryApprenticeship, IsQualifyingCategoryApprencticeshipAny),
                [TypeOfFunding.OtherAdult]      = PackageRoutines(IsQualifyingCategoryOtherFundingAny),
                [TypeOfFunding.NotFundedByESFA] = PackageRoutines(IsQualifyingCategoryAdvancedLearnerLoan, IsQualifyingCategoryOtherFundingAny),
                [TypeOfFunding.Age16To19ExcludingApprenticeships] = PackageRoutines(IsQualifyingCategory16To19EFA),
                [TypeOfFunding.Other16To19]        = PackageRoutines(IsQualifyingCategory16To19EFA),
                [TypeOfFunding.EuropeanSocialFund] = PackageRoutines(IsQualifyingCategoryESF),
                [TypeOfFunding.CommunityLearning]  = PackageRoutines(IsQualifyingCategoryCommunityLearning),
            };
        }
        /// <summary>
        /// New rule.
        /// </summary>
        /// <returns>a constructed and mocked up derived data rule</returns>
        public DerivedData_21Rule NewRule(IProvideRuleCommonOperations commonOperations = null)
        {
            var commonOps = new Mock <IProvideRuleCommonOperations>(MockBehavior.Strict);

            return(new DerivedData_21Rule(commonOperations == null ? commonOps.Object : commonOperations));
        }