public IActionResult GetAll() { var todoTasks = _todoTaskService.GetAll(); var model = _mapper.Map <IEnumerable <TodoTask>, IEnumerable <TodoTaskResourceModel> >(todoTasks); return(Ok(model)); }
public void Remove_ExistingIdPassed_RemovesOneItem() { // Arrange var existingId = 2; // Act var okResponse = _controller.Delete(existingId); // Assert Assert.Equal(2, _service.GetAll().Count()); }