public IHttpActionResult DeleteTask(DataLayer.Tasks t)
        {
            try
            {
                taskBL.DeleteTask(t);
            }
            catch
            {
                return(StatusCode(HttpStatusCode.BadRequest));
            }

            return(StatusCode(HttpStatusCode.OK));
        }
Ejemplo n.º 2
0
        //Test Method for Delete List Item
        public void DeleteTaskTest()
        {
            int id = 2;

            try
            {
                blObj.DeleteTask(id);
                Assert.IsTrue(1 == 1);
            }
            catch
            {
                Assert.Inconclusive("Task not deleted");
            }
        }
 //Method used to delete existing task item
 public IHttpActionResult DeleteTask(int Id)
 {
     blObject = new TaskManagerBL();
     blObject.DeleteTask(Id);
     return(Ok());
 }
Ejemplo n.º 4
0
        //Performance checking for delete list item
        public void DeleteTaskTest()
        {
            int id = 2;

            blObj.DeleteTask(id);
        }