Ejemplo n.º 1
0
        public BusinessLogicValidationServiceTest()
        {
            var cardService = new CardServiceMockFactory().MockObject();

            _cardCheckerMock = new CardCheckerMockFactory().Mock();
            var generatorService = new CardNumberGeneratorMockFactory().MockObject();

            _businessLogicValidationService =
                new BusinessLogicValidationService(_cardCheckerMock.Object);

            _testDataGenerator = new TestDataGenerator(cardService, generatorService);
        }
 public BankService(
     ICardRepository cardRepository,
     ICardService cardService,
     IBusinessLogicValidationService businessLogicValidationService,
     ICurrencyConverter currencyConverter,
     ICardNumberGenerator cardNumberGenerator)
 {
     _cardRepository = cardRepository ?? throw new ArgumentNullException(nameof(cardRepository));
     _cardService    = cardService ?? throw new ArgumentNullException(nameof(cardService));
     _businessLogicValidationService = businessLogicValidationService ??
                                       throw new ArgumentNullException(nameof(businessLogicValidationService));
     _currencyConverter   = currencyConverter ?? throw new ArgumentNullException(nameof(currencyConverter));
     _cardNumberGenerator = cardNumberGenerator ?? throw new ArgumentNullException(nameof(cardNumberGenerator));
 }