I am writing the unit test for a method. I have properly configured all the setups. While debugging unit test it works and returns values as expected. But in assertion it still throws false.
Therefore, I am not able to understand why does VerifyAll throws false all the time? How to find out which setup failed the VerifyAll assert?
VerifyAllverifies that all your Setups were called. It sounds like you have aSetupthat is not relevant to your test, hence your are getting the expected output, yet theVerifyAllfails because thatSetupwas never called.When
VerifyAllfails you will get an exception, and the reason is given there. For example, if I create an unusedSetupin a test I get: