public async Task GetAll_ShouldReturn4Items() { // Arrange var service = new TodoItemService(_testBase.Context); // Act var result = await service.GetAll(); // Assert result.Count().ShouldBe(4); }
public async Task GetAll_ShouldReturnAllTodoItems() { // Arrange var service = new TodoItemService(_fixture.Context); // Act var result = await service.GetAll(); // Assert result.Should().NotBeNull(); result.Should().HaveCount(1); }
/// <summary> /// Action, which displays a list of todo items. /// </summary> /// <returns></returns> public IActionResult Index() { var service = new TodoItemService(); return(View(service.GetAll())); }
public List <TodoItem> GetTodoItems(int listId) { return(service.GetAll(listId)); }
public async Task <ActionResult> Index() { var listTodoItemDTO = await todoItemService.GetAll(); return(View(listTodoItemDTO)); }
// GET: api/TodoItem public IHttpActionResult Get() { return(Ok(_service.GetAll())); }
public ActionResult <IEnumerable <TodoItem> > GetTodoItems(int listId) { return(todoItemService.GetAll(listId)); }