Using Verify to confirm expected parameter values in Moq mock class
In Verify Moq by default checks reference equality for arguments so it only passes when you provide the same instances (except if you’ve overriden Equals) in your tests and in your implementation. In you case the expectedA.Value just returns the new A { P1 = 1 } created in the test which, of course, isn’t … Read more