public IHttpActionResult Post(Task item) { TaskBAL ts = new TaskBAL(); ts.AddTask(item); return(Ok("Record added")); }
public void AddTask() { TaskBAL obje = new TaskBAL(); int count = obje.GetTask().Count(); Task T = (new Task { ParentName = "ParentTaskstest", TaskName = "Testtaskname", Priority = 15, SDate = DateTime.Now, EDate = DateTime.Now }); obje.AddTask(T); int count1 = obje.GetTask().Count(); Assert.AreEqual(count1, count + 1); }