Browse Source

Fixed integration test cases

main
Sumit Ghosh 5 years ago
parent
commit
1f1882e320
  1. 9
      tests/FunctionalTests/PublicApi/CatalogItemEndpoints/CreateEndpoint.cs

9
tests/FunctionalTests/PublicApi/CatalogItemEndpoints/CreateEndpoint.cs

@ -18,8 +18,7 @@ namespace Microsoft.eShopWeb.FunctionalTests.Web.Controllers
private int _testBrandId = 1; private int _testBrandId = 1;
private int _testTypeId = 2; private int _testTypeId = 2;
private string _testDescription = "test description"; private string _testDescription = "test description";
private string _testName = "test name"; private string _testName = "test name";
private string _testUri = "test uri";
private decimal _testPrice = 1.23m; private decimal _testPrice = 1.23m;
public CreateEndpoint(ApiTestFixture factory) public CreateEndpoint(ApiTestFixture factory)
@ -54,8 +53,7 @@ namespace Microsoft.eShopWeb.FunctionalTests.Web.Controllers
Assert.Equal(_testBrandId, model.CatalogItem.CatalogBrandId); Assert.Equal(_testBrandId, model.CatalogItem.CatalogBrandId);
Assert.Equal(_testTypeId, model.CatalogItem.CatalogTypeId); Assert.Equal(_testTypeId, model.CatalogItem.CatalogTypeId);
Assert.Equal(_testDescription, model.CatalogItem.Description); Assert.Equal(_testDescription, model.CatalogItem.Description);
Assert.Equal(_testName, model.CatalogItem.Name); Assert.Equal(_testName, model.CatalogItem.Name);
Assert.Equal(_testUri, model.CatalogItem.PictureUri);
Assert.Equal(_testPrice, model.CatalogItem.Price); Assert.Equal(_testPrice, model.CatalogItem.Price);
} }
@ -66,8 +64,7 @@ namespace Microsoft.eShopWeb.FunctionalTests.Web.Controllers
CatalogBrandId = _testBrandId, CatalogBrandId = _testBrandId,
CatalogTypeId = _testTypeId, CatalogTypeId = _testTypeId,
Description = _testDescription, Description = _testDescription,
Name = _testName, Name = _testName,
PictureUri = _testUri,
Price = _testPrice Price = _testPrice
}; };
var jsonContent = new StringContent(JsonSerializer.Serialize(request), Encoding.UTF8, "application/json"); var jsonContent = new StringContent(JsonSerializer.Serialize(request), Encoding.UTF8, "application/json");

Loading…
Cancel
Save