Hi Neil,
When using Swap.NextInstance() the aim is to replace behavior unreachable in the test (because it's on an object instantiated in the code under test), with behavior defined on a fake object. Because the swapped instance is normally unreachable, verifying against it is unsupported. Instead, you should verify against the fake you substitute it with:
var fake = Isolate.Fake.Instance<A>();
Isolate.Swap.NextInstance<A>().With(fake);
// this is the future instance, it is normally not instantiated in the test context
A a = new A();
a.AMethod();
// in the test context we verify against the fake we created earlier in the test
Isolate.Verify.WasCalledWithExactArguments(() => fake.AMethod());
Please let me know if this helps.
Doron
Typemock Support