I am getting this error when I try to set a mock to have PropertyBehavior()
:
System.InvalidOperationException: System.InvalidOperationEx
You mentioned using a stub instead of a mock but before you go changing it I'd note that strangely, I get the Invalid Call exception when I used GenerateStub but not when I use GenerateMock.
View = MockRepository.GenerateStub();
View.Stub(v => v.Message).PropertyBehavior();
This throws the Invalid call exception and yes, IAddressView.Message does have a getter and setter.