Esempio n. 1
0
        public void Constructor_Throws(IConfiguration configuration, IMapper mapper, IBankHttpClient bankHttpClient, string name)
        {
            Action act = () => { new BankService(configuration, mapper, bankHttpClient); };

            act.Should().Throw <ArgumentNullException>()
            .Where(x => x.Message.Contains(name));
        }
 public PaymentProcessCommand(IPaymentProcessWriteRepository repository, IBankHttpClient bankClient,
                              IPaymentRuleEngine ruleEngine, ILogger <PaymentProcessCommand> logger, IEncryptionClient encryptionClient)
 {
     _repository       = repository;
     _bankClient       = bankClient;
     _ruleEngine       = ruleEngine;
     _logger           = logger;
     _encryptionClient = encryptionClient;
 }
Esempio n. 3
0
        public BankService(IConfiguration configuration, IMapper mapper, IBankHttpClient bankHttpClient)
        {
            _mapper         = mapper ?? throw new ArgumentNullException(nameof(mapper));
            _bankHttpClient = bankHttpClient ?? throw new ArgumentNullException(nameof(bankHttpClient));
            _ = configuration ?? throw new ArgumentNullException(nameof(configuration));

            ClientId     = $"{configuration[CLIENT_ID]}";
            ClientSecret = $"{configuration[CLIENT_SECRET]}";
        }
 public BankRepository(IBankHttpClient bankHttpClient, IMapper mapper)
 {
     _bankHttpClient = bankHttpClient;
     _mapper         = mapper;
 }