From 9e9ffa7df0ce2b16bd7b89560699e77e31558712 Mon Sep 17 00:00:00 2001 From: Cristopher Coronado Moreira Date: Sun, 26 Dec 2021 13:31:04 -0500 Subject: [PATCH] Fixing the order of the parameters in ProductsControllerTests for Assert.Equal --- .../Controllers/ProductsControllerTests.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/Store.FunctionalTests/Controllers/ProductsControllerTests.cs b/tests/Store.FunctionalTests/Controllers/ProductsControllerTests.cs index 9a10c40..f35efdb 100644 --- a/tests/Store.FunctionalTests/Controllers/ProductsControllerTests.cs +++ b/tests/Store.FunctionalTests/Controllers/ProductsControllerTests.cs @@ -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); @@ -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] @@ -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]