public async Task Delete_Categoria() { var service = new CategoriaController(_mockContext.Object); await service.DeleteCategoria(1); _mockSet.Verify(m => m.FindAsync(1), Times.Once()); _mockSet.Verify(m => m.Remove(_categoria), Times.Once); _mockContext.Verify(m => m.SaveChangesAsync(It.IsAny <CancellationToken>()), Times.Once()); }