Starting with Moq 4.9.0, you can access the call list of the simulated object and execute statements for them without the need for a callback:
[Test]
public void TestMoq()
{
var someClass = new Mock<ISomeClass>();
someClass.Object.SomeMethod(42, null);
someClass.Object.SomeMethod(88, "Hello");
Assert.AreEqual(42, (int) someClass.Invocations[0].Arguments[0]);
Assert.IsNull(someClass.Invocations[0].Arguments[1]);
Assert.AreEqual(88, (int) someClass.Invocations[1].Arguments[0]);
Assert.AreEqual("Hello", someClass.Invocations[1].Arguments[1]);
}
, , , , object s, , Callback. , Setup, .