public IHttpActionResult post(tblTask item)
        {
            ProjectBL obj = new ProjectBL();

            obj.AddTask(item);
            return(Ok("Record added"));
        }
Example #2
0
        public void AddTask()
        {
            ProjectBL obje  = new ProjectBL();
            int       count = obje.GetTask().Count();
            tblTask   T     = (new tblTask {
                TaskName = "Working", TStartDate = DateTime.Now, TEndDate = DateTime.Now, TPriority = 10, TStatus = false, ParentTaskName = "Cleaning", UserId = 1
            });

            obje.AddTask(T);
            int count1 = obje.GetTask().Count();

            Assert.AreEqual(count1, count + 1);
        }