public void Test_Get(ToDoDbContext context) { var entry = AddEntry(DateTime.Now); var result = _todoController.GetToDos(); Assert.Equals(result.Value.Count(), 1); _todoRepo.Delete(entry); }
public void Get() { // Arrange ToDosController controller = new ToDosController(); // Act var result = controller.GetToDos() as OkNegotiatedContentResult <List <ToDo> >; // Assert Assert.IsNotNull(result); Assert.IsNotNull(result.Content); Assert.IsTrue(result.Content.Count == 2); }