Mocking an HTTPContext

No Comments

I was trying to write some tests to test the Create method in my Controller and I needed to mock the User.IsInRole("Administrator") so that I can continue with my testing.  So I was looking around for some help, and I found this very interesting blog from Scott Hanselman.

Its a library of MvcMockHelpers using either Rhino Mocks or Moq.

Share and Enjoy:
  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks

Related posts:

  1. Configuring Exception Handling and logging with Enterprise Library 4.0

Leave a Reply

Blog WebMastered by All in One Webmaster.