You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a simple public virtual string Foo {get;set;} on my class to be mocked.
The mocked object does not remember the value I pass in via mock.Object.Foo = "bar"; even after i call mock.SetUpAllProperties().
As far as I can tell this used to work in an older version. Isn't "stubbing" or "property behavior" supposed to work with virtual properties?
The text was updated successfully, but these errors were encountered:
This test passes in the current version of Moq (4.7.49).
If I misunderstood your scenario, please report back with a small but complete repro code and an indication of which version of Moq you're using. In the meantime, I am closing this issue as "non-reproducible error".
I have a simple
public virtual string Foo {get;set;}
on my class to be mocked.The mocked object does not remember the value I pass in via
mock.Object.Foo = "bar";
even after i callmock.SetUpAllProperties()
.As far as I can tell this used to work in an older version. Isn't "stubbing" or "property behavior" supposed to work with virtual properties?
The text was updated successfully, but these errors were encountered: