Exemplo n.º 1
0
        public void TestWebApiAddTask()
        {
            // Arrange
            Task item = new Task();

            item.TaskName  = "TaskApiTest1";
            item.ProjectID = projectId;
            item.ParentID  = 1;
            item.Priority  = 10;
            item.StartDate = DateTime.Now;
            item.EndDate   = DateTime.Now;
            item.Status    = true;
            item.UserID    = userId;

            //Act
            IHttpActionResult actionResult = projectObj.AddTask(item);
            Task test = projectObj.GetByTaskName("TaskApiTest1");

            taskId = test.TaskID;

            //Assert
            Assert.IsInstanceOf(typeof(OkResult), actionResult);
            // Assert.AreEqual("TaskTest2", test.TaskName);
        }