public void DeleteTask() { TaskBAL obj = new TaskBAL(); List <Task> Ts = obj.GetTask(); Task Taskgetbyid = obj.GetTaskbyId(Ts[0].TaskId); int count1 = obj.GetTask().Count(); obj.DeleteTask(Taskgetbyid.TaskId); int count2 = obj.GetTask().Count(); Assert.AreEqual(count2, count1 - 1); }
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); }
public void updateTask() { TaskBAL obj = new TaskBAL(); List <Task> Ts = obj.GetTask(); Task Taskgetbyid = obj.GetTaskbyId(Ts[0].TaskId); int count = obj.GetTask().Count(); Task T = (new Task { TaskId = Taskgetbyid.TaskId, ParentName = "ParentTaskstest", TaskName = "Testtaskname", Priority = 15, SDate = DateTime.Now, EDate = DateTime.Now }); obj.UpdateTask(T); int count1 = obj.GetTask().Count(); List <Task> TS1 = obj.GetTask(); Assert.AreEqual(T.TaskName, TS1[0].TaskName); }
public void Getall() { TaskBAL obj = new TaskBAL(); int count = obj.GetTask().Count(); Assert.Greater(count, 0); }
public void Getbytask() { TaskBAL obj = new TaskBAL(); List <Task> Ts = obj.GetTask(); Task count = obj.GetTaskbyId(Ts[0].TaskId); Assert.IsNotNull(count); }
public IHttpActionResult Get() { TaskBAL ts = new TaskBAL(); return(Ok(ts.GetTask())); }