public LearnerAmalgamator(
            IAmalgamator <MessageLearnerProviderSpecLearnerMonitoring> providerSpecLearnerMonitoringAmalgamator,
            IAmalgamator <MessageLearnerLearnerEmploymentStatus> learnerEmploymentStatusAmalgamator,
            IAmalgamator <MessageLearnerLearnerHE> learnerHEAmalgamator,
            IRuleProvider ruleProvider,
            IAmalgamationErrorHandler amalgamationErrorHandler)
            : base(Entity.Learner, (x) => x.LearnRefNumber, amalgamationErrorHandler)
        {
            _providerSpecLearnerMonitoringAmalgamator = providerSpecLearnerMonitoringAmalgamator;
            _learnerEmploymentStatusAmalgamator       = learnerEmploymentStatusAmalgamator;
            _learnerHEAmalgamator = learnerHEAmalgamator;

            _standardRuleString          = ruleProvider.BuildStandardRule <string>();
            _standardRuleStringFirstItem = ruleProvider.BuildStandardRuleFirstItem <string>();
            _standardRuleLong            = ruleProvider.BuildStandardRule <long?>();
            _standardRuleDateTime        = ruleProvider.BuildStandardRule <DateTime?>();
            _addressRule  = ruleProvider.BuildAddressRule();
            _ulnRule      = ruleProvider.BuildUlnRule();
            _alsCostrule  = ruleProvider.BuildAlsCostRule();
            _postCodeRule = ruleProvider.BuildPostCodeRule();
            _learnerContactPreferenceCollectionRule = ruleProvider.BuildLearnerContactPreferenceCollectionRule();
            _lLDDandHealthProblemCollectionRule     = ruleProvider.BuildLLDDandHealthProblemCollectionRule();
            _learnerFAMAmalgamationRule             = ruleProvider.BuildLearnerFAMAmalgamationRule();
            _learningDeliveryRule = ruleProvider.BuildLearningDeliveryRule();
        }
예제 #2
0
 public LLDDandHealthProblemAmalgamator NewAmalgamator(
     IRuleProvider ruleProvider = null,
     IAmalgamationErrorHandler amalgamationErrorHandler = null)
 {
     return(new LLDDandHealthProblemAmalgamator(
                ruleProvider ?? Mock.Of <IRuleProvider>(),
                amalgamationErrorHandler ?? Mock.Of <IAmalgamationErrorHandler>()));
 }
예제 #3
0
 public LearnerAmalgamator BuildAmalgamator(
     IAmalgamator <MessageLearnerLearnerEmploymentStatus> learnerEmploymentStatusAmalgamator = null,
     IAmalgamator <MessageLearnerLearnerHE> learnerHEAmalgamator = null,
     IRuleProvider ruleProvider = null,
     IAmalgamationErrorHandler amalgamationErrorHandler = null)
 {
     return(null);
     //new LearnerAmalgamator(
     //learnerEmploymentStatusAmalgamator ?? Mock.Of<IAmalgamator<MessageLearnerLearnerEmploymentStatus>>(),
     //learnerHEAmalgamator ?? Mock.Of<IAmalgamator<MessageLearnerLearnerHE>>(),
     //ruleProvider ?? Mock.Of<IRuleProvider>(),
     //amalgamationErrorHandler ?? Mock.Of<IAmalgamationErrorHandler>());
 }
 public LearnerHEAmalgamator(IAmalgamator <MessageLearnerLearnerHELearnerHEFinancialSupport> learnerHEFinancialSupportAmalgamator, IRuleProvider ruleProvider, IAmalgamationErrorHandler amalgamationErrorHandler)
     : base(Entity.LearnerHE, (x) => x.LearnRefNumber.ToString(), amalgamationErrorHandler)
 {
     _learnerHEFinancialSupportAmalgamator = learnerHEFinancialSupportAmalgamator;
     _standardRuleString = ruleProvider.BuildStandardRule <string>();
     _standardRuleLong   = ruleProvider.BuildStandardRule <long?>();
 }
예제 #5
0
 public LearnerHEFinancialSupportAmalgamator(IRuleProvider ruleProvider, IAmalgamationErrorHandler amalgamationErrorHandler)
     : base(Entity.LearnerHEFinancialSupport, (x) => x.FINTYPE.ToString(), amalgamationErrorHandler)
 {
     _standardRuleLong = ruleProvider.BuildStandardRule <long?>();
 }
예제 #6
0
 public HeaderAmalgamator(IAmalgamator <MessageHeaderSource> sourceAmalgamator, IAmalgamator <MessageHeaderCollectionDetails> collectionDetailsAmalgamator, IAmalgamationErrorHandler amalgamationErrorHandler)
     : base(Entity.Header, (x) => x.SourceFileName, amalgamationErrorHandler)
 {
     _sourceAmalgamator            = sourceAmalgamator;
     _collectionDetailsAmalgamator = collectionDetailsAmalgamator;
 }
 private AbstractAmalgamatorCaller <TestData> NewAmalgamator(Entity entityType, IAmalgamationErrorHandler amalgamationErrorHandler)
 {
     return(new AbstractAmalgamatorCaller <TestData>(entityType, amalgamationErrorHandler));
 }
예제 #8
0
 public AmalgamationService(IAmalgamator <Message> messageAmalgamator, IAmalgamationErrorHandler amalgamationErrorHandler)
 {
     _messageAmalgamator       = messageAmalgamator;
     _amalgamationErrorHandler = amalgamationErrorHandler;
 }
        public LearnerEmploymentStatusAmalgamator(IAmalgamator <MessageLearnerLearnerEmploymentStatusEmploymentStatusMonitoring> learnerEmploymentStatusMonitoringAmalgamator, IRuleProvider ruleProvider, IAmalgamationErrorHandler amalgamationErrorHandler)
            : base(Entity.LearnerEmploymentStatus, (x) => x.DateEmpStatApp.ToString(), amalgamationErrorHandler)
        {
            _learnerEmploymentStatusMonitoringAmalgamator = learnerEmploymentStatusMonitoringAmalgamator;

            _standardRuleString   = ruleProvider.BuildStandardRule <string>();
            _standardRuleLong     = ruleProvider.BuildStandardRule <long?>();
            _standardRuleDateTime = ruleProvider.BuildStandardRule <DateTime?>();
        }
 public HeaderSourceAmalgamator(IDateTimeProvider dateTimeProvider, IAmalgamationErrorHandler amalgamationErrorHandler)
     : base(Entity.Source, (x) => null, amalgamationErrorHandler)
 {
     _dateTimeProvider = dateTimeProvider;
 }
예제 #11
0
 public HeaderSourceAmalgamator NewAmalgamator(IDateTimeProvider dateTimeProvider = null, IAmalgamationErrorHandler amalgamationErrorHandler = null)
 {
     return(new HeaderSourceAmalgamator(
                dateTimeProvider ?? Mock.Of <IDateTimeProvider>(),
                amalgamationErrorHandler ?? Mock.Of <IAmalgamationErrorHandler>()));
 }
예제 #12
0
 public HeaderCollectionDetailsAmalgamator(IAmalgamationErrorHandler amalgamationErrorHandler)
     : base(Entity.CollectionDetails, (x) => null, amalgamationErrorHandler)
 {
 }
예제 #13
0
 public LearnerEmploymentStatusMonitoringAmalgamator(IRuleProvider ruleProvider, IAmalgamationErrorHandler amalgamationErrorHandler)
     : base(Entity.EmploymentStatusMonitoring, (x) => x.ESMType.ToString(), amalgamationErrorHandler)
 {
     _standardRuleString = ruleProvider.BuildStandardRule <string>();
     _standardRuleLong   = ruleProvider.BuildStandardRule <long?>();
 }
예제 #14
0
 public AbstractAmalgamatorCaller(Entity entityType, IAmalgamationErrorHandler amalgamationErrorHandler)
     : base(entityType, (x) => string.Empty, amalgamationErrorHandler)
 {
 }
 public ProviderSpecLearnerMonitoringAmalgamator(IRuleProvider ruleProvider, IAmalgamationErrorHandler amalgamationErrorHandler)
     : base(Entity.ProviderSpecLearnerMonitoring, (x) => x.ProvSpecLearnMonOccur.ToString(), amalgamationErrorHandler)
 {
     _standardRuleString      = ruleProvider.BuildStandardRule <string>();
     _standardRuleFirstString = ruleProvider.BuildStandardRuleFirstItem <string>();
 }
 public LLDDandHealthProblemAmalgamator(IRuleProvider ruleProvider, IAmalgamationErrorHandler amalgamationErrorHandler)
     : base(Entity.LLDDAndHealthProblems, (x) => x.LLDDCat.ToString(), amalgamationErrorHandler)
 {
     _standardRuleLong = ruleProvider.BuildStandardRule <long?>();
 }
 public LearnerDestinationandProgressionAmalgamator(IRuleProvider ruleProvider, IAmalgamationErrorHandler amalgamationErrorHandler)
     : base(Entity.LearnerDestinationandProgression, (x) => x.LearnRefNumber.ToString(), amalgamationErrorHandler)
 {
     _ruleProvider = ruleProvider;
 }
예제 #18
0
 public HeaderCollectionDetailsAmalgamator NewAmalgamator(
     IAmalgamationErrorHandler amalgamationErrorHandler = null)
 {
     return(new HeaderCollectionDetailsAmalgamator(
                amalgamationErrorHandler ?? Mock.Of <IAmalgamationErrorHandler>()));
 }
예제 #19
0
 public MessageAmalgamator(IAmalgamator <MessageHeader> headerAmalgamator, IAmalgamator <MessageLearner> learnerAmalgamator, IAmalgamator <MessageLearnerDestinationandProgression> learnerDestinationandProgressionAmalgamator, IAmalgamationErrorHandler amalgamationErrorHandler)
     : base(Entity.Message, (x) => null, amalgamationErrorHandler)
 {
     _headerAmalgamator  = headerAmalgamator;
     _learnerAmalgamator = learnerAmalgamator;
     _learnerDestinationandProgressionAmalgamator = learnerDestinationandProgressionAmalgamator;
 }
예제 #20
0
 protected AbstractAmalgamator(Entity entityType, Expression <Func <T, string> > keyValueSelector, IAmalgamationErrorHandler amalgamationErrorHandler)
 {
     _entityType = entityType;
     _amalgamationErrorHandler = amalgamationErrorHandler;
     _keyValueSelectorFunc     = keyValueSelector.Compile();
 }