I have simple class
public class Simple
{
public virtual int VirtualProperty { get; set; }
}
When i run (FakeItEasy.1.13.1)
var strict = A.Fake<Simple>(options => options.Strict());
A.CallTo(() => strict.VirtualProperty).CallsBaseMethod();
strict.VirtualProperty = 999;
I get an error
Call to non configured method "set_VirtualProperty" of strict fake.
And I have to
var strict = A.Fake<Simple>(options => options.Strict());
A.CallTo(strict).Where(a => a.Method.Name == "get_VirtualProperty").CallsBaseMethod();
A.CallTo(strict).Where(a => a.Method.Name == "set_VirtualProperty").CallsBaseMethod();
strict.VirtualProperty = 999;
Does CallBaseMethod () works for virtual property? What am I doing wrong?