/// <summary>
        /// Construct a new instance of CartPricingProvider
        /// </summary>
        public CartPricingProvider(
            IResellerProvider resellerProvider, 
            ICurrencyPreferenceProvider currencyPreferenceProvider, 
            ICountryProvider countryProvider, 
            IContactDataProvider contactDataProvider,
            RenewalPeriodProvider renewalPeriodProvider, 
            IVatDisplayPreferenceProvider vatDisplayPreferenceProvider, 
            PublicBillingApiProxy billingApi)
            : base(billingApi)
        {
            if (resellerProvider == null)
            {
                throw new ArgumentNullException("resellerProvider");
            }

            if (currencyPreferenceProvider == null)
            {
                throw new ArgumentNullException("currencyPreferenceProvider");
            }

            if (countryProvider == null)
            {
                throw new ArgumentNullException("countryProvider");
            }

            if (contactDataProvider == null)
            {
                throw new ArgumentNullException("contactDataProvider");
            }

            if (renewalPeriodProvider == null)
            {
                throw new ArgumentNullException("renewalPeriodProvider");
            }

            if (vatDisplayPreferenceProvider == null)
            {
                throw new ArgumentNullException("vatDisplayPreferenceProvider");
            }

            this.resellerProvider = resellerProvider;
            this.currencyPreferenceProvider = currencyPreferenceProvider;
            this.countryProvider = countryProvider;
            this.contactDataProvider = contactDataProvider;
            this.renewalPeriodProvider = renewalPeriodProvider;
            this.pricesIncludeVat = vatDisplayPreferenceProvider.ShowPricesIncludingVat();
            this.inclusiveTaxCalculationType = resellerProvider.GetReseller().InclusiveTaxCalculationType;
        }
Esempio n. 2
0
 public void Cleanup()
 {
     _dataProvider = null;
 }
 public ContactService(IEmailService emailService, IContactDataProvider contactDataProvider, IEmailContext emailContext)
 {
     _emailService        = emailService ?? throw new ArgumentNullException(nameof(emailService));
     _contactDataProvider = contactDataProvider ?? throw new ArgumentNullException(nameof(contactDataProvider));
     _emailContext        = emailContext ?? throw new ArgumentNullException(nameof(emailContext));
 }
Esempio n. 4
0
 public void Setup()
 {
     _mockFileProvider = new FileProviderMock();
     _dataProvider     = new CsvContactDataProvider(_mockFileProvider);
 }