I have a private static method as follows -
private static List<String> Method (string name, params object[] parameters)
{
//method body
}
The following verify fails when the arguments actually match –
Isolate.Verify.NonPublic.WasCalled(typeof(MyClass), "Method").WithArguments(name, param1, param2, param3);
For testing, I modified my method to be internal instead of private and tested with the public accessor – which passes.
Isolate.Verify.WasCalledWithExactArguments(() => MyClass. Method( name, param1, param2, param3));
Is there something different that needs to be done for nonpublic methods? Is this a bug?
Thanks.