public new void SetUp() { _paymentSettings = new PaymentSettings(); _paymentSettings.ActivePaymentMethodSystemNames = new List <string>(); _paymentSettings.ActivePaymentMethodSystemNames.Add("Payments.TestMethod"); _storeMappingRepository = MockRepository.GenerateMock <IRepository <StoreMapping> >(); _storeMappingService = MockRepository.GenerateMock <IStoreMappingService>(); _cartRuleProvider = MockRepository.GenerateMock <ICartRuleProvider>(); _services = MockRepository.GenerateMock <ICommonServices>(); _services.Expect(x => x.RequestCache).Return(NullRequestCache.Instance); var paymentMethods = new List <PaymentMethod> { new PaymentMethod { PaymentMethodSystemName = "Payments.TestMethod" } }; _paymentMethodRepository = MockRepository.GenerateMock <IRepository <PaymentMethod> >(); _paymentMethodRepository.Expect(x => x.TableUntracked).Return(paymentMethods.AsQueryable()); _typeFinder = MockRepository.GenerateMock <ITypeFinder>(); _typeFinder.Expect(x => x.FindClassesOfType((Type)null, null, true)).IgnoreArguments().Return(Enumerable.Empty <Type>()).Repeat.Any(); var localizationService = MockRepository.GenerateMock <ILocalizationService>(); localizationService.Expect(ls => ls.GetResource(null)).IgnoreArguments().Return("NotSupported").Repeat.Any(); _paymentService = new PaymentService(_paymentMethodRepository, _storeMappingRepository, _storeMappingService, _paymentSettings, _cartRuleProvider, this.ProviderManager, _services, _typeFinder); }
public new void SetUp() { _paymentSettings = new PaymentSettings(); _paymentSettings.ActivePaymentMethodSystemNames = new List<string>(); _paymentSettings.ActivePaymentMethodSystemNames.Add("Payments.TestMethod"); _shoppingCartSettings = new ShoppingCartSettings(); _paymentMethodRepository = MockRepository.GenerateMock<IRepository<PaymentMethod>>(); _services = MockRepository.GenerateMock<ICommonServices>(); _typeFinder = MockRepository.GenerateMock<ITypeFinder>(); _typeFinder.Expect(x => x.FindClassesOfType((Type)null, null, true)).IgnoreArguments().Return(Enumerable.Empty<Type>()).Repeat.Any(); var localizationService = MockRepository.GenerateMock<ILocalizationService>(); localizationService.Expect(ls => ls.GetResource(null)).IgnoreArguments().Return("NotSupported").Repeat.Any(); _paymentService = new PaymentService(_paymentMethodRepository, _paymentSettings, _shoppingCartSettings, this.ProviderManager, _services, _typeFinder); }
public new void SetUp() { _paymentSettings = new PaymentSettings(); _paymentSettings.ActivePaymentMethodSystemNames = new List <string>(); _paymentSettings.ActivePaymentMethodSystemNames.Add("Payments.TestMethod"); _shoppingCartSettings = new ShoppingCartSettings(); _paymentMethodRepository = MockRepository.GenerateMock <IRepository <PaymentMethod> >(); _services = MockRepository.GenerateMock <ICommonServices>(); _typeFinder = MockRepository.GenerateMock <ITypeFinder>(); _typeFinder.Expect(x => x.FindClassesOfType((Type)null, null, true)).IgnoreArguments().Return(Enumerable.Empty <Type>()).Repeat.Any(); var localizationService = MockRepository.GenerateMock <ILocalizationService>(); localizationService.Expect(ls => ls.GetResource(null)).IgnoreArguments().Return("NotSupported").Repeat.Any(); _paymentService = new PaymentService(_paymentMethodRepository, _paymentSettings, _shoppingCartSettings, this.ProviderManager, _services, _typeFinder); }