public void Post() { Product product = new Product() { Name = "Test", Details = "Test", Price = 0 }; var response = ProductEndpoints.CreateProduct(product.Name, product.Details, product.Price).Result; Assert.IsTrue(response.StatusCode == System.Net.HttpStatusCode.Created); }
public async Task <IActionResult> Create(string name, string details, double price) { var result = await ProductEndpoints.CreateProduct(name, details, price); return(RedirectToAction("Index", "Product")); }