NSubstitute

Verifying calls with NSubstitute

This one came up recently so I thought I would do a post for my future self, so I have something to come back to. Being a conscientious developer 1 I was creating unit tests and I found a situation where I wanted to verify the call to a method was the expected call, in this case the functionality being tested was creating an object and then calling a repository to persist this, I needed to check the object being persisted was as I expected.

Read more...