Given mock.SetupGet(o => o.Property).CallBase()
, strict mocks throw, demanding that the setup provide a return value
#448
Labels
Strict mocks verify that setups for property getters actually specify some return value. (For the same reason that C# enforces non-
void
methods to return a value if they don't throw an exception first, so that verification is perfectly reasonable.)The following test fails:
However, it should pass because
BooleanProperty
has been set up to return a value; not an explicitly specified value (.Returns(…)
), but whatever the base class' (Foo
's)BooleanProperty
returns (.CallBase()
).The text was updated successfully, but these errors were encountered: