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);
        }
示例#2
0
        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);
            }
        }
示例#3
0
        public IHttpActionResult UpdateTask(Task task)
        {
            businessObj.UpdateTask(task);

            return(Content(HttpStatusCode.Accepted, task));
        }