Ejemplo n.º 1
0
        public void Setup()
        {
            _marketMock = new Mock<IMarket>();
            _marketMock.Setup(x => x.Currencies).Returns(() => new[] { new Currency("USD"), new Currency("SEK") });
            _marketMock.Setup(x => x.DefaultCurrency).Returns(new Currency("USD"));

            _cookieServiceMock = new Mock<CookieService>();
            _cookieServiceMock.Setup(x => x.Get(It.IsAny<string>())).Returns("USD");

            _currentMarketMock = new Mock<ICurrentMarket>();
            _currentMarketMock.Setup(x => x.GetCurrentMarket()).Returns(_marketMock.Object);

            _subject = new CurrencyService(_currentMarketMock.Object, _cookieServiceMock.Object);
        }
 public CheckoutControllerForTest(ICartService cartService, IContentRepository contentRepository, UrlResolver urlResolver, IMailService mailService, ICheckoutService checkoutService, IContentLoader contentLoader, IPaymentService paymentService, LocalizationService localizationService, Func<string,CartHelper> cartHelper, CurrencyService currencyService, AddressBookService addressBookService, ControllerExceptionHandler controllerExceptionHandler, CustomerContextFacade customerContextFacade)
     : base(cartService, contentRepository, urlResolver, mailService, checkoutService, contentLoader, paymentService, localizationService, cartHelper, currencyService, addressBookService, controllerExceptionHandler,customerContextFacade)
 {
 }