Moq – Capture parameters with Callback()

When you’re using Moq to set up a mocked method, you can use Callback() to capture the parameters passed into the mocked method: There are two main use cases for capturing parameters in a test: In this article, I’ll show examples of using Callback() in those two scenarios, and then I’ll explain some problems to … Read more