public async Task GivenTodoItemsExists_WhenGetWithoutId_ThenReturnAllTodoItems() { using (var context = new TodoContext(_contextOptions)) { TodoItemsController controller = new TodoItemsController(context); var actionResult = await controller.GetTodoItems(); var items = actionResult.Value.ToList(); Assert.AreEqual(3, items.Count); var toFind = new TodoItemDTO(context.TodoItems.First()); Assert.IsTrue(items.Contains(toFind)); } }