Moq - verifying a call with parameter that is changed during the execution of the test
问题 Given the following code public class Entity { public string Name { get; set; } public string Status { get; set; } } public interface IRepository { void InsertEntity(Entity entity); void UpdateEntity(Entity entity); } public class Processor { private IRepository _repository; public Processor(IRepository repository) { _repository = repository; } public void Execute(string name) { var entity = new Entity() { Name = name, Status = "Initialized" }; _repository.InsertEntity(entity); // do other