BasketService no onger uses UriComposer

- Also fixing corresponding unit tests
This commit is contained in:
Eric Fleming
2019-04-19 11:06:00 -04:00
parent c0f0cf3a1a
commit 693c6c4466
4 changed files with 5 additions and 9 deletions

View File

@@ -26,7 +26,7 @@ namespace Microsoft.eShopWeb.UnitTests.ApplicationCore.Services.BasketServiceTes
basket.AddItem(2, It.IsAny<decimal>(), It.IsAny<int>());
_mockBasketRepo.Setup(x => x.GetByIdAsync(It.IsAny<int>()))
.ReturnsAsync(basket);
var basketService = new BasketService(_mockBasketRepo.Object, null, null, _mockBasketItemRepo.Object);
var basketService = new BasketService(_mockBasketRepo.Object, null, _mockBasketItemRepo.Object);
await basketService.DeleteBasketAsync(It.IsAny<int>());

View File

@@ -21,7 +21,7 @@ namespace Microsoft.eShopWeb.UnitTests.ApplicationCore.Services.BasketServiceTes
[Fact]
public async void ThrowsGivenInvalidBasketId()
{
var basketService = new BasketService(_mockBasketRepo.Object, null, null, null);
var basketService = new BasketService(_mockBasketRepo.Object, null, null);
await Assert.ThrowsAsync<BasketNotFoundException>(async () =>
await basketService.SetQuantities(_invalidId, new System.Collections.Generic.Dictionary<string, int>()));
@@ -30,7 +30,7 @@ namespace Microsoft.eShopWeb.UnitTests.ApplicationCore.Services.BasketServiceTes
[Fact]
public async void ThrowsGivenNullQuantities()
{
var basketService = new BasketService(null, null, null, null);
var basketService = new BasketService(null, null, null);
await Assert.ThrowsAsync<ArgumentNullException>(async () =>
await basketService.SetQuantities(123, null));

View File

@@ -9,7 +9,7 @@ namespace Microsoft.eShopWeb.UnitTests.ApplicationCore.Services.BasketServiceTes
[Fact]
public async void ThrowsGivenNullAnonymousId()
{
var basketService = new BasketService(null, null, null, null);
var basketService = new BasketService(null, null, null);
await Assert.ThrowsAsync<ArgumentNullException>(async () => await basketService.TransferBasketAsync(null, "steve"));
}
@@ -17,7 +17,7 @@ namespace Microsoft.eShopWeb.UnitTests.ApplicationCore.Services.BasketServiceTes
[Fact]
public async void ThrowsGivenNullUserId()
{
var basketService = new BasketService(null, null, null, null);
var basketService = new BasketService(null, null, null);
await Assert.ThrowsAsync<ArgumentNullException>(async () => await basketService.TransferBasketAsync("abcdefg", null));
}