In my test, I defined as data a List
with some record in.
I\'d like setup a moq the methode Update
, this method receive the user <
Mock _mockUserRepository = new Mock();
_mockUserRepository.Setup(mr => mr.Update(It.IsAny(), It.IsAny()))
.Callback((int id, string name) =>
{
//Your callback method here
});
//check to see how many times the method was called
_mockUserRepository.Verify(mr => mr.Update(It.IsAny(), It.IsAny()), Times.Once());