In Isolator 6.0.4, an ArgumentOutOfRangeException is thrown when the user doesn't fake static methods before calling an Isolate.Verify method. Expected is a TypemockException that says to fake static methods if using an Isolate.Verify call.
[ img ]
----------------------
[ img ]
private static void MultiArgMethod(int x, string s, char c)
{
}
[TestMethod]
public void MutliArgMethod_Tests()
{
Isolate.Fake.StaticMethods<TypemockTutorialTests>();
MultiArgMethod(1, "abc", 'q');
Isolate.Verify.WasCalledWithArguments(() =>
MultiArgMethod(default(int), default(string), default(char)))
.Matching((object[] args) =>
(int)args[0] > 0 &&
((string)args[1]).Length == 3 &&
Char.IsLetter((char)(args[2])));
}
This bug also happens for instance methods:
[ img ]