In 6.0.1, this code throws an unexpected ArgumentOutOfRangeException:
[ img ]
public class A
{
public void Method()
{
}
}
[TestClass, Isolated]
public class Tests
{
[TestMethod]
public void Test()
{
A a = Isolate.Fake.Instance<A>(Members.CallOriginal);
a.Method();
Isolate.Verify.WasCalledWithExactArguments(() => a.Method());
Isolate.CleanUp();
a.Method();
Isolate.Verify.WasCalledWithExactArguments(() => a.Method());
}
}
Expected is a TypemockException saying "a" is no longer a fake due to the call to CleanUp() and the last WasCalledWithExactArguments() cannot be called on a non-fake.