public void Del_Test() { service.Add(new ShopOrder() { OrderId = 1, Price = 200 }); service.Add(new ShopOrder() { OrderId = 2, Price = 300 }); service.Add(new ShopOrder() { OrderId = 3, Price = 400 }); service.Del(new ShopOrder() { OrderId = 2, Price = 300 }); var check = service.Get(2); Assert.AreEqual(check, null); }
public IHttpActionResult Remove(int id) { services.Del(services.Get(id)); return(Ok()); }