// GET: Seller/Products/Delete/5 public ActionResult Delete(int id) { ProductsClient CC = new ProductsClient(); CC.Delete(id); return(RedirectToAction("Index")); }
public async Task DeletesCorrectUrl() { var connection = Substitute.For <IApiConnection>(); var client = new ProductsClient(connection); await client.Delete(123); Received.InOrder(async() => { await connection.Delete(Arg.Is <Uri>(u => u.ToString() == "products/123")); }); }