public void ToIdExists_False() { MockTodoRepository mockObj = new MockTodoRepository(); List <ToDo> getAllTodo = mockObj.getAllTodo(); bool isExist = ValidateUtility.ToDoIdExists(getAllTodo, 12); Assert.AreEqual(false, isExist); }
public void Test_ToDoExists_False() { MockTodoRepository mockToDoObj = new MockTodoRepository(); ToDoController tc = new ToDoController(mockToDoObj); bool apiResponse = ValidateUtility.ToDoIdExists(TodoTestData.GetMockAllToDo(), 50); Assert.IsFalse(apiResponse); }
public void Test_ToDoExists_True() { bool apiResponse = ValidateUtility.ToDoIdExists(TodoTestData.GetMockAllToDo(), 2); Assert.IsTrue(apiResponse); }
/// <summary> /// Method to check if item already exist in the database for the given id /// </summary> /// <param name="id"></param> /// <returns>true if value exist, false if value doesnt exist</returns> public bool ToDoIdExists(int id) { return(ValidateUtility.ToDoIdExists(_repository.getAllTodo(), id)); }