Пример #1
0
 public SetTaxDetailsTests()
 {
     _amazonSyncSettings = new AmazonSyncSettings() { UseDefaultTaxRateForShippingTax = true, TryCalculateVat = true };
     _taxSettings = new TaxSettings() { TaxesEnabled = true, ShippingRateTaxesEnabled = true };
     _taxRateManager = A.Fake<ITaxRateManager>();
     _setTaxes = new SetTaxDetails(_amazonSyncSettings, _taxSettings, _taxRateManager);
 }
Пример #2
0
 public SetTaxes(AmazonSyncSettings amazonSyncSettings, TaxSettings taxSettings,
     ISetTaxDetails taxRateManager)
 {
     _amazonSyncSettings = amazonSyncSettings;
     _taxSettings = taxSettings;
     _setTaxDetails = taxRateManager;
 }
Пример #3
0
 public TaxRateControllerTests()
 {
     _taxRateManager = A.Fake<ITaxRateManager>();
     _configurationProvider = A.Fake<IConfigurationProvider>();
     _taxSettings = new TaxSettings();
     _taxRateController = new TaxRateController(_taxRateManager, _configurationProvider, _taxSettings);
 }
Пример #4
0
 public static void SetTaxSettings(this IKernel kernel, bool taxesEnabled = false, bool loadedPricesIncludeTax = false, bool shippingTaxesEnabled = false, bool shippingPricesIncludeTax = false)
 {
     var taxSettings = new TaxSettings
     {
         TaxesEnabled = taxesEnabled,
         LoadedPricesIncludeTax = loadedPricesIncludeTax,
         ShippingRateTaxesEnabled = shippingTaxesEnabled,
         ShippingRateIncludesTax = shippingPricesIncludeTax
     };
     kernel.Rebind<TaxSettings>().ToConstant(taxSettings);
     kernel.Rebind<IProductPricingService>().ToConstant(new ProductPricingService(taxSettings));
 }
Пример #5
0
 public OrderInvoiceService(EcommerceSettings ecommerceSettings, IGetLogoUrl getLogoUrl, TaxSettings taxSettings)
 {
     _ecommerceSettings = ecommerceSettings;
     _getLogoUrl = getLogoUrl;
     _taxSettings = taxSettings;
 }
Пример #6
0
 public ProductPricingService(TaxSettings taxSettings)
 {
     _taxSettings = taxSettings;
 }
Пример #7
0
 protected ShippingCalculationTests()
 {
     _taxSettings = new TaxSettings();
     Kernel.Bind<TaxSettings>().ToConstant(TaxSettings);
 }
Пример #8
0
        public void TaxRateController_Settings_ShouldCallSaveSettingsOnTheConfigurationProvider()
        {
            var taxSettings = new TaxSettings();

            _taxRateController.Settings(taxSettings);

            A.CallTo(() => _configurationProvider.SaveSettings(taxSettings)).MustHaveHappened();
        }
Пример #9
0
 public ShippingPricingService(TaxSettings taxSettings)
 {
     _taxSettings = taxSettings;
 }