Skip to content

Commit

Permalink
Fixing the order of the parameters in ProductsControllerTests for Ass…
Browse files Browse the repository at this point in the history
…ert.Equal
  • Loading branch information
cristofima committed Dec 26, 2021
1 parent 61893c9 commit 9e9ffa7
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public async Task GetProductById_ProductExists_ReturnsCorrectProduct()
var statusCode = response.StatusCode.ToString();

Assert.Equal("OK", statusCode);
Assert.Equal(result.Id, productId);
Assert.Equal(productId, result.Id);
Assert.NotNull(result.Name);
Assert.True(result.Price > 0);
Assert.True(result.Stock > 0);
Expand Down Expand Up @@ -98,10 +98,10 @@ public async Task PostProduct_ReturnsCreatedProduct()
var statusCode2 = response2.StatusCode.ToString();

Assert.Equal("OK", statusCode2);
Assert.Equal(result2.Id, createdProduct.Id);
Assert.Equal(result2.Name, createdProduct.Name);
Assert.Equal(result2.Description, createdProduct.Description);
Assert.Equal(result2.Stock, createdProduct.Stock);
Assert.Equal(createdProduct.Id, result2.Id);
Assert.Equal(createdProduct.Name, result2.Name);
Assert.Equal(createdProduct.Description, result2.Description);
Assert.Equal(createdProduct.Stock, result2.Stock);
}

[Fact]
Expand Down Expand Up @@ -172,10 +172,10 @@ public async Task PutProduct_ReturnsUpdatedProduct()
var statusCode2 = response2.StatusCode.ToString();

Assert.Equal("OK", statusCode2);
Assert.Equal(result2.Id, updatedProduct.Id);
Assert.Equal(result2.Name, updatedProduct.Name);
Assert.Equal(result2.Description, updatedProduct.Description);
Assert.Equal(result2.Stock, updatedProduct.Stock);
Assert.Equal(updatedProduct.Id, result2.Id);
Assert.Equal(updatedProduct.Name, result2.Name);
Assert.Equal(updatedProduct.Description, result2.Description);
Assert.Equal(updatedProduct.Stock, result2.Stock);
}

[Fact]
Expand Down

0 comments on commit 9e9ffa7

Please sign in to comment.