Example #1
0
        public void SetUp()
        {
            _mocks = new MockRepository();
            _creditCardRepository      = _mocks.StrictMock <IPaymentInstrumentRepository>();
            _checkRepository           = _mocks.StrictMock <IPaymentInstrumentRepository>();
            _keyValueDictionaryFactory = _mocks.StrictMock <IKeyValueDictionaryFactory <PaymentType, IPaymentInstrumentRepository> >();
            _repository = new CombinedPaymentInstrumentRepository(
                new List <IPaymentInstrumentRepository> {
                _creditCardRepository, _checkRepository
            },
                _keyValueDictionaryFactory);

            _repositoryDictionary = new Dictionary <PaymentType, IPaymentInstrumentRepository> {
                { PaymentType.CreditCard, _creditCardRepository },
                { PaymentType.Check, _checkRepository }
            };
        }
Example #2
0
 protected override void TearDown()
 {
     base.TearDown();
     _paymentInstrumentRepository = null;
 }
Example #3
0
 protected override void SetUp()
 {
     base.SetUp();
     _paymentInstrumentFactory    = _mocks.StrictMock <IPaymentInstrumentFactory>();
     _paymentInstrumentRepository = new CombinedPaymentInstrumentRepository(_persistenceLayer, _paymentInstrumentFactory);
 }