public void ShouldAllowDeletingQuote() { var oldCount = _manager.List().Count(); _manager.Delete(50).GetAwaiter().GetResult(); Assert.Throws <AppNotFoundException>(() => _manager.Find(50).GetAwaiter().GetResult()); var currentCount = _manager.List().Count(); Assert.NotEqual(oldCount, currentCount); Assert.Equal(oldCount - 1, currentCount); }
public async Task <IActionResult> Delete(int id) { await _manager.Delete(id); return(NoContent()); }