http://codebetter.com/blogs/jean-paul_boodhoo/archive/2007/05/07/raising-events-from-a-mock-using-rhino-mocks.aspx
On Thu, Nov 13, 2008 at 11:55 PM, Adam <[EMAIL PROTECTED]> wrote:
>
> I'm mocking an object which implements INotifyPropertyChanged. How
> would I go about having my mock raise this event. Here's what I have:
>
> result.Stub(x => x.TCOApprovalDate).Raise(x => result.PropertyChanged,
> new System.ComponentModel.PropertyChangingEventArgs
> ("TCOApprovalDate"));
>
>
> Obviously the compiler does not like result.PropertyChanged since
> result is out of scope for the lambda expression. How do I tell the
> mock to raise the PropertyChanged event when a certain property
> changes on the mock?
>
> Thanks!
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---