Friday, August 2, 2019

If you want MOQ to return null for a mocked method you have to cast null to the specific type otherwise returned.

.Returns(null);

 
 

...must instead become:

.Returns((YourTypeHere)null);

No comments:

Post a Comment