public async Task Post_Categoria() { var service = new CategoriasController(_mockContext.Object); await service.PostCategoria(_categoria); // Verifica se o método foi realmente chamado e se foi executado somente uma vez _mockSet.Verify(Xunit => Xunit.Add(_categoria), Times.Once); _mockContext.Verify(m => m.SaveChangesAsync(It.IsAny <CancellationToken>()), Times.Once()); }