Skip to content

Commit 05fed22

Browse files
committed
Fix failling unit tests
1 parent 376030c commit 05fed22

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Services/Basket/Basket.UnitTests/Application/BasketWebApiTest.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ public async Task Get_customer_basket_success()
5454
var actionResult = await basketController.GetBasketByIdAsync(fakeCustomerId);
5555

5656
//Assert
57-
Assert.Equal(((CustomerBasket)actionResult.Value).BuyerId, fakeCustomerId);
57+
Assert.Equal((actionResult.Result as OkObjectResult).StatusCode, (int)System.Net.HttpStatusCode.OK);
58+
Assert.Equal((((ObjectResult)actionResult.Result).Value as CustomerBasket).BuyerId, fakeCustomerId);
5859
}
5960

6061
[Fact]
@@ -79,7 +80,8 @@ public async Task Post_customer_basket_success()
7980
var actionResult = await basketController.UpdateBasketAsync(fakeCustomerBasket);
8081

8182
//Assert
82-
Assert.Equal(((CustomerBasket)actionResult.Value).BuyerId, fakeCustomerId);
83+
Assert.Equal((actionResult.Result as OkObjectResult).StatusCode, (int)System.Net.HttpStatusCode.OK);
84+
Assert.Equal((((ObjectResult)actionResult.Result).Value as CustomerBasket).BuyerId, fakeCustomerId);
8385
}
8486

8587
[Fact]

0 commit comments

Comments
 (0)