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 } }; }
public CombinedPaymentInstrumentRepository(IEnumerable <IPaymentInstrumentRepository> paymentInstrumentRepositories, IKeyValueDictionaryFactory <PaymentType, IPaymentInstrumentRepository> dictionaryFactory) { _paymentInstrumentRepositories = paymentInstrumentRepositories; _dictionaryFactory = dictionaryFactory; }
public DomainDictionaryFactory(IKeyValueDictionaryFactory <long, Domain> keyValueDictionaryFactory) { _keyValueDictionaryFactory = keyValueDictionaryFactory; }
public CombinedPaymentInstrumentRepository(IPaymentInstrumentRepositoryListFactory paymentInstrumentRepositoryListFactory, IKeyValueDictionaryFactory <PaymentType, IPaymentInstrumentRepository> dictionaryFactory) : this(paymentInstrumentRepositoryListFactory.GetPaymentInstrumentRepositories(), dictionaryFactory) { }