Hi Easwaran, Is it a MVC controller you want to test, then try to have a look at this article from Microsoft which explains how to tests actions in controllers. http://msdn.microsoft.com/en-us/magazine/dd942838.aspx
Otherwise how about just making mocks instances of IWebStateProvider and IUserSessionManagement, and then use those to test it. -Kim. On Fri, Jun 1, 2012 at 6:20 AM, Easwaran Paramasivam < [email protected]> wrote: > I've a class as given below. How could I mock the class using Rhino > mock? > > public class MyController > { > > .... > ...... > > public MyController(IWebStateProvider webStateProvider, > IUserSessionManagement userSessionManagment) > { > this.mWebState = webStateProvider; > this.mUserSessionManagment = userSessionManagment; > } > ...... > } > > -- > 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. > > -- Regards Kim Falk Jorgensen Everyone’s quick to blame the alien. ~Aeschylus -- 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.
