public void TestMethod1() { var mockContext = new Mock <IContext>(); mockContext.Setup(m => m.Clientes).Returns(new FakeSET <Cliente>()); var service = new RepoCliente(mockContext.Object); service.CadastrarCliente(new Cliente() { Nome = "Codorna", Cpf = "089.358.804-00", DadosCartao = "1", Endereco = "rua dez", ClienteId = 50 }); mockContext.Verify(m => m.SaveChanges(), Times.Once()); }