コード例 #1
0
ファイル: SetTaxes.cs プロジェクト: neozhu/Ecommerce
 public SetTaxes(AmazonSyncSettings amazonSyncSettings, TaxSettings taxSettings,
     ISetTaxDetails taxRateManager)
 {
     _amazonSyncSettings = amazonSyncSettings;
     _taxSettings = taxSettings;
     _setTaxDetails = taxRateManager;
 }
コード例 #2
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);
 }
コード例 #3
0
 public SettingsControllerTests()
 {
     _configurationProvider = A.Fake<IConfigurationProvider>();
     _amazonLogService = A.Fake<IAmazonLogService>();
     _amazonAppSettings = A.Fake<AmazonAppSettings>();
     _amazonSellerSettings = A.Fake<AmazonSellerSettings>();
      _amazonSyncSettings = A.Fake<AmazonSyncSettings>();
      _settingsController = new SettingsController(_configurationProvider, _amazonLogService, _amazonAppSettings, _amazonSellerSettings, _amazonSyncSettings);
 }
コード例 #4
0
        public void SettingsController_SyncPOST_ShouldSaveSettings()
        {
            var model = new AmazonSyncSettings();

            var result = _settingsController.Sync_POST(model);

            result.Should().BeOfType<ViewResult>();
        }
コード例 #5
0
        public void SettingsController_SyncPOST_ShouldCallAddLog()
        {
            var model = new AmazonSyncSettings();

            var result = _settingsController.Sync_POST(model);

            A.CallTo(() => _amazonLogService.Add(AmazonLogType.SyncSettings, AmazonLogStatus.Update,
                null, null, null, null, null, null, null, null, string.Empty)).MustHaveHappened();
        }