|
by Patrik Hägne via Legend and truth on 7/31/2009 7:22:00 PM
Syntax for event raising is kind of awkward across the line, and for good reason, there simply is no really good way of doing it since an event always has to be positioned to the of an event attachment or detachment (+= or –=). Just from the top of my head I think the way it’s done (or rather one of the ways you can do it) in Rhino Mocks is something like this:var foo = MockRepository.GenerateMock<IFoo>();
foo.Raise(x => x.SomethingHappened += null, foo, EventArgs.Empty);
I think (I ha
... [ read more ]
|
|