public void Delete_item_should_return_true_with_list_desc_one(int id)
        {
            var currentListCount = ItemList.Count;
            var result           = _applicationServices.DeleteItem(id);

            Assert.IsTrue(result);
            Assert.That(currentListCount - 1 == ItemList.Count);
        }
Exemplo n.º 2
0
        public IHttpActionResult DeleteItem([FromUri] int id)
        {
            var action = new Func <IHttpActionResult>(() =>
            {
                var result = _productDataServices.DeleteItem(id);
                return(result ?  (IHttpActionResult)Ok("") : new NotFoundResult(this));
            });

            return(ErrorHandlerWrapper(action));
        }