Hi,
Actually the second test does work :)
You made one small mistake in the last line:
Isolate.Verify.NonPublic.Property.WasCalledSet( false, "IsDisposed" ).WithArgument( true );
WasCalledSet() method should get the fake as an argument and not 'false'.
Also the line: Isolate.WhenCalled(() => fake.Dispose()).WithExactArguments().CallOriginal();
is redundent since you set the default behavior of the class as Memebers.CallOriginal
Please try the code below and let me know if works for you:
[Test, Isolated]
public void IsDisposed_Property_Is_Set_To_Proper_Values()
{
Foo fake = Isolate.Fake.Instance<Foo>(Members.CallOriginal);
Isolate.NonPublic.Property.WhenGetCalled( fake, "IsDisposed" ).WillReturn( false );
// not needed since you created the fake above with Members.CallOriginal
//Isolate.WhenCalled(() => fake.Dispose()).WithExactArguments().CallOriginal();
fake.Dispose();
Isolate.Verify.NonPublic.Property.WasCalledSet( fake, "IsDisposed" ).WithArgument( true );
}