c# - Dynamically Subscribing to Events in RhinoMocks -


We are currently migrating from NMock2 to RhinoMocks and we are having trouble copying this code:

P>

  foreach (EventInfo e type type (MarketMapPopupIMVPView) .GetEvents () Expect.Once.On (mockView) EventAdd (e.Name, New Typemetre));  

Originally it was placed inside the template for the template to ensure that the developers using the template were actually waving the event in the presenter, which was listed in the view Were. The problem is that we do not know the events in advance and hopefully can not replace the name that can not find a way to do it in Rhinomox.

I have already done some stuff like this, but in most cases it is not worth it. is. Having less time and effort in writing your own stub will be more expressive and understandable. I wrote a post about it and could help.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -