I have a POCO that I save, for example:
_myRepo.Save(somePoco);
_myRepo ridiculed, for example:
var myRepo = new Mock<IRepo>();
When this Save method is called, I want to set somePoco.Id to 1.
How can I do it?
I see that there is a Callback .Setup method, but it does not go through POCO, for example:
myRepo.Setup(x => x.Save(It.IsAny<SomePoco>()) .Callback(x =>
source share