Browse Source

Fix failling unit tests

pull/1005/head
Miguel Veloso 5 years ago
parent
commit
05fed22b01
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      src/Services/Basket/Basket.UnitTests/Application/BasketWebApiTest.cs

+ 4
- 2
src/Services/Basket/Basket.UnitTests/Application/BasketWebApiTest.cs View File

@ -54,7 +54,8 @@ namespace UnitTest.Basket.Application
var actionResult = await basketController.GetBasketByIdAsync(fakeCustomerId); var actionResult = await basketController.GetBasketByIdAsync(fakeCustomerId);
//Assert //Assert
Assert.Equal(((CustomerBasket)actionResult.Value).BuyerId, fakeCustomerId);
Assert.Equal((actionResult.Result as OkObjectResult).StatusCode, (int)System.Net.HttpStatusCode.OK);
Assert.Equal((((ObjectResult)actionResult.Result).Value as CustomerBasket).BuyerId, fakeCustomerId);
} }
[Fact] [Fact]
@ -79,7 +80,8 @@ namespace UnitTest.Basket.Application
var actionResult = await basketController.UpdateBasketAsync(fakeCustomerBasket); var actionResult = await basketController.UpdateBasketAsync(fakeCustomerBasket);
//Assert //Assert
Assert.Equal(((CustomerBasket)actionResult.Value).BuyerId, fakeCustomerId);
Assert.Equal((actionResult.Result as OkObjectResult).StatusCode, (int)System.Net.HttpStatusCode.OK);
Assert.Equal((((ObjectResult)actionResult.Result).Value as CustomerBasket).BuyerId, fakeCustomerId);
} }
[Fact] [Fact]


Loading…
Cancel
Save