public LevyDeclaration(IPollingMessageReceiver pollingMessageReceiver, IMediator mediator,
                        ILogger logger, IDasAccountService dasAccountService)
 {
     _pollingMessageReceiver = pollingMessageReceiver;
     _mediator          = mediator;
     _logger            = logger;
     _dasAccountService = dasAccountService;
 }
示例#2
0
        public LevyWorkerDefaultRegistry(IMessagePublisher messagePublisher, IPollingMessageReceiver messageReceiver, IHmrcService hmrcService, IEventsApi eventApi = null)
        {
            Scan(scan =>
            {
                scan.AssembliesFromApplicationBaseDirectory(a => a.GetName().Name.StartsWith("SFA.DAS."));
                scan.RegisterConcreteTypesAgainstTheFirstInterface();
            });

            For <IConfiguration>().Use <EmployerLevyConfiguration>();
            For <IEventsApi>().Use(eventApi ?? Mock.Of <IEventsApi>());
            For <ILog>().Use(Mock.Of <ILog>());
            For <IMessagePublisher>().Use(messagePublisher);
            For <IPollingMessageReceiver>().Use(messageReceiver);
            For <IHmrcService>().Use(hmrcService);
            For <IHmrcDateService>().Use <HmrcDateService>();
            For <IMessageProcessor>().Use <LevyDeclaration>();

            RegisterExecutionPolicies();

            RegisterMapper();

            AddMediatrRegistrations();
        }
 public TestClassPolling(IPollingMessageReceiver pollingMessageReceiver)
 {
     PollingMessageReceiver = pollingMessageReceiver;
 }
 public PayeSchemeAdded(IPollingMessageReceiver pollingMessageReceiver, IMediator mediator, ILog logger) : base(pollingMessageReceiver, logger)
 {
     _mediator = mediator;
 }
 public PaymentAccountCreated(IPollingMessageReceiver pollingMessageReceiver, ILog log, IMediator mediator) : base(pollingMessageReceiver, log)
 {
     _log      = log;
     _mediator = mediator;
 }
示例#6
0
 public static Container CreateLevyWorkerContainer(IMessagePublisher messagePublisher, IPollingMessageReceiver messageReceiver, IHmrcService hmrcService, IEventsApi eventsApi = null)
 {
     return(new Container(c =>
     {
         c.Policies.Add(new ConfigurationPolicy <EmployerLevyConfiguration>("SFA.DAS.EmployerLevy"));
         c.Policies.Add(new ConfigurationPolicy <TokenServiceApiClientConfiguration>("SFA.DAS.TokenServiceApiClient"));
         c.Policies.Add(new ExecutionPolicyPolicy());
         c.AddRegistry(new LevyWorkerDefaultRegistry(messagePublisher, messageReceiver, hmrcService, eventsApi));
     }));
 }
 public DeleteDeletePayeScheme(IPollingMessageReceiver pollingMessageReceiver, IMediator mediator, ILog log) : base(pollingMessageReceiver, log)
 {
     _mediator = mediator;
 }
示例#8
0
 public LevyDeclaration(IPollingMessageReceiver pollingMessageReceiver, IMediator mediator, ILog logger) : base(pollingMessageReceiver, logger)
 {
     _mediator = mediator;
 }
 public PaymentDataProcessor(IPollingMessageReceiver pollingMessageReceiver, IMediator mediator, ILogger logger)
 {
     _pollingMessageReceiver = pollingMessageReceiver;
     _mediator = mediator;
     _logger   = logger;
 }