public void DeleteNormalTask() { ToDoTask _toDoTask = new ToDoTask(); List <Guid> storedIds = new List <Guid>() { new Guid("p99a9154-117b-4fc8-951b-86312a0d11ec"), new Guid("s99b9154-117b-4fc8-951b-86312a0d11ec") }; IEnumerable <TodoTaskModel> _normalTodoTaskModel = _toDoTask.DeleteByIds(storedIds); Assert.AreEqual(0, _agileTodoTaskModel); }
//[Authorize] //[ValidateAntiForgeryToken] public HttpStatusCodeResult DeleteTasks(List <Guid> taskIds) { ToDoTask toDoTask = new ToDoTask(); toDoTask.SetToDoTaskStrategy(new NormalTask()); IEnumerable <TodoTaskModel> _normalTodoTaskModels = toDoTask.DeleteByIds(taskIds); return(_normalTodoTaskModels.Count() == 0 ? new HttpStatusCodeResult(HttpStatusCode.OK, "Record deleted") : new HttpStatusCodeResult(HttpStatusCode.BadRequest, "Bad Request")); }
public void DeleteAgileTask() { ToDoTask _toDoTask = new ToDoTask(); List <Guid> storedIds = new List <Guid>() { new Guid("a444b67a-85ad-480a-8dc8-577155587356"), new Guid("b444b67b-85ad-480a-8dc8-577155587356") }; IEnumerable <TodoTaskModel> _agileTodoTaskModel = _toDoTask.DeleteByIds(storedIds); Assert.AreEqual(0, _agileTodoTaskModel); }