I'm using MSpec in my Mobile Services application. I want to verify that a method on my custom logger is called when a param passed in is null. Is this possible?
code
if (someOrg == null || target == null) {
AppUtils.LogInfo(">>>>> +++ Utils-GetAsNeededItems - Null input");
return null;
}
You can use Moq with MSpec.
You can also use the overload of
Verifyand make sure it was called once or at least x time, or at most x times etc.