It seems that isolated attribute clears the fakes when exiting the test method.
I think it should clear the fakes at the end of the teardown.
the following example demonstrate such a failure:
public class IsolatedBeforeTearDown
static UnderTest target;
public void Setup()
target = new UnderTest();
Isolate.WhenCalled(() => target.ReturnFive()).WillReturn(6);
public void TearDown()
public void bTest()
And while we are on it, it appears that the Isolated attribute can decorate other methods and not only test methods.
I don't think that was what the intended meaning of the attribute was
(We just spend two hours worth of debugging just because someone put it on top of the setup method...)
I think the two things related, and if you can cause the fakes to be clean at the end of the test (and not the test method) it would solve both issues.