public void StaticFieldAccessIsFaked() { Replace.CallsTo(() => StaticClass.StaticField).With(() => 99); var code = new CodeUnderTest(); var result = code.CallsStaticField(); Assert.AreEqual(99, result); }
public void OriginalStaticFieldAccessSucceeds() { StaticClass.StaticField = 1234; Replace.CallsTo(() => StaticClass.StaticField).CallOriginal(); var code = new CodeUnderTest(); var result = code.CallsStaticField(); Assert.AreEqual(1234, result); }