public async Task ShouldHavePassWhenDeleteAsyncItem() { //arrange await _itemToDoService.DeleteAsync(_firstItem.Id); //actual var actualItems = await _itemToDoService.BrowsAsync(); //assert Assert.That(!actualItems.Any(x => x.Id == _firstItem.Id)); }
public async Task <IActionResult> OnPostDeleteAsync(Guid id) { await _itemToDoInMemoryService.DeleteAsync(id); return(RedirectToPage()); }