public void BenchmarkAddUpdate() { Task task = new Task(); task.TaskName = "Test444"; task.ParentID = 5; task.StartDate = DateTime.Now; task.EndDate = DateTime.Now; task.ProjectID = 1; task.Status = true; task.Priority = 12; task.UserID = 3; obj.AddTask(task); obj.UpdateTask(task); }
public void TestUpdateTask() { taskId = 2; Task item = new Task(); item.TaskID = taskId; item.ParentID = 1; item.TaskName = "TestTask1000"; item.Priority = 40; item.StartDate = DateTime.Now; item.EndDate = DateTime.Now.AddDays(2); item.Status = true; businessObj.UpdateTask(item); Task itemafterupdate = businessObj.GetByTaskName("TestTask1000"); if (itemafterupdate != null) { Assert.AreEqual(item.Priority, itemafterupdate.Priority); } }
public IHttpActionResult UpdateTask(Task task) { businessObj.UpdateTask(task); return(Content(HttpStatusCode.Accepted, task)); }