public void CheckThatGetOneEndpointThatDoesNotExistReturnsNull() { //Removing test products Assert.IsTrue(ProductClient.DeleteProduct(100)); //The actual call that is being tested var result = ProductClient.GetProduct(100); Assert.IsNull(result); }
public void CheckThatGetOneEndpointReturnsAProduct() { //Removing test products Assert.IsTrue(ProductClient.DeleteProduct(100)); //Creating the products that will be used by the test Assert.IsTrue(ProductClient.PostProduct(new Model.Product() { Id = 100, Description = "Some description1", Is4G = true, Name = "name1", Price = 100, Weight = 100 })); //The actual call that is being tested var result = ProductClient.GetProduct(100); Assert.IsTrue(result != null); Assert.IsTrue(result.Is4G); Assert.IsTrue(result.Description == "Some description1"); Assert.IsTrue(result.Name == "name1"); Assert.IsTrue(result.Price == 100); Assert.IsTrue(result.Weight == 100); }