Depends if you want to test/assert the property was called. Most often this is an over specification (I use "expect" mostly on component calls which have void return type).
If you don't want to set an expectation use the Stub() call. On 8/11/09, TheMightyKumquat <[email protected]> wrote: > > Thank you, Phil, I see! > > I thought the rule was whenever a property is set, set up its > expectations by coding the property being set before the call to > Replay. Replacing my line > ' controller's Entity prop gets set > mockController.EntityDocument = fakeEntity > with > Rhino.Mocks.Expect.Call(mockController.Entity).Return(fakeEntity) > makes the test pass. > > So if it's a property on a mocked object, regardless of whether the > property access Set or Get, should I always code > Rhino.Mocks.Expect.Call(mockedObject.PropertyName).Return(myValue)? > > > > > -- Sent from my mobile device Tim Barcz ASPInsider http://timbarcz.devlicio.us http://www.twitter.com/timbarcz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Rhino.Mocks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/RhinoMocks?hl=en -~----------~----~----~----~------~----~------~--~---
