Esempio n. 1
0
 public TransactionGrain(
     IPaymentRequestHandler paymentRequestHandler,
     IPaymentReconciliationHandler paymentReconciliationHandler,
     IProviderNotificationHandler providerNotificationHandler)
 {
     _paymentRequestHandler        = paymentRequestHandler;
     _paymentReconciliationHandler = paymentReconciliationHandler;
     _providerNotificationHandler  = providerNotificationHandler;
 }
Esempio n. 2
0
        public void Initialise()
        {
            var logger = Substitute.For <ILogger>();

            _handler     = Substitute.For <IPaymentRequestHandler>();
            _respository = Substitute.For <IPaymentRequestRepository>();

            _paymentsController = new PaymentsController(_handler, _respository, logger);
        }
        public PaymentsController(
            IPaymentRequestHandler paymentHandler,
            IPaymentRequestRepository repository,
            ILogger logger)
        {
            _logger = logger;
            _logger?.LogTrace($"Creating a {nameof(PaymentsController)}");

            _paymentHandler = paymentHandler ?? throw new ArgumentNullException(nameof(paymentHandler));
            _repository     = repository ?? throw new ArgumentNullException(nameof(repository));
        }