Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzysztofPajak committed Oct 23, 2020
1 parent 516f0a0 commit b9871ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
10 changes: 4 additions & 6 deletions Tests/Grand.Services.Tests/Orders/OrderProcessingServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public class OrderProcessingServiceTests
private IMediator _eventPublisher;
private IAffiliateService _affiliateService;
private IVendorService _vendorService;
private IWarehouseService _warehouseService;
private IPdfService _pdfService;
private IGeoLookupService _geoLookupService;
private ICountryService _countryService;
Expand Down Expand Up @@ -121,6 +122,8 @@ public void TestInitialize()
}
var cacheManager = new TestMemoryCacheManager(new Mock<IMemoryCache>().Object, _eventPublisher);

_warehouseService = new Mock<IWarehouseService>().Object;

_productService = new Mock<IProductService>().Object;

//price calculation service
Expand Down Expand Up @@ -154,10 +157,7 @@ public void TestInitialize()
_warehouseRepository = new Mock<IRepository<Warehouse>>().Object;

_logger = new NullLogger();
_shippingService = new ShippingService(_shippingMethodRepository,
_deliveryDateRepository,
_warehouseRepository,
null,
_shippingService = new ShippingService(_warehouseService,
_logger,
_productService,
_productAttributeParser,
Expand All @@ -167,9 +167,7 @@ public void TestInitialize()
_countryService,
_stateProvinceService,
pluginFinder,
_eventPublisher,
_currencyService,
cacheManager,
_shoppingCartSettings,
_shippingSettings);
_shipmentService = new Mock<IShipmentService>().Object;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public class OrderTotalCalculationServiceTests
private ICurrencyService _currencyService;
private IServiceProvider _serviceProvider;
private IStateProvinceService _stateProvinceService;
private IWarehouseService _warehouseService;

[TestInitialize()]
public void TestInitialize()
Expand Down Expand Up @@ -105,7 +106,7 @@ public void TestInitialize()
_vendorService = new Mock<IVendorService>().Object;
_currencyService = new Mock<ICurrencyService>().Object;
_serviceProvider = new Mock<IServiceProvider>().Object;

_warehouseService = new Mock<IWarehouseService>().Object;
_shoppingCartSettings = new ShoppingCartSettings();
_catalogSettings = new CatalogSettings();
_customerService = new Mock<ICustomerService>().Object;
Expand Down Expand Up @@ -143,10 +144,7 @@ public void TestInitialize()
_taxSettings.PaymentMethodAdditionalFeeIsTaxable = true;
_taxSettings.DefaultTaxAddressId = "10";

_shippingService = new ShippingService(_shippingMethodRepository,
_deliveryDateRepository,
_warehouseRepository,
null,
_shippingService = new ShippingService(_warehouseService,
_logger,
_productService,
_productAttributeParser,
Expand All @@ -156,14 +154,10 @@ public void TestInitialize()
_countryService,
_stateProvinceService,
pluginFinder,
_eventPublisher,
_currencyService,
cacheManager,
_shoppingCartSettings,
_shippingSettings);



var tempAddressService = new Mock<IAddressService>();
{
tempAddressService.Setup(x => x.GetAddressByIdSettings(_taxSettings.DefaultTaxAddressId))
Expand Down

0 comments on commit b9871ae

Please sign in to comment.