Rhino Mocks

Rhino Mocks seems to be one of the most preferred mock frameworks out there.

Phil Haack, CodeBetter and Markitup have article showing how to test events on interfaces (x2) and objects in Rhino Mocks respectively.

They even have some videos up showing some Rhino Mocks stuff.

Haack also has a nice example of using MVP and Rhino Mocks to test some asp.net pages.

Advertisement

Simulating HttpContext

Update: Phil Haack has updated his HttpContext Simulator with some new goodies.

Here is an article by Haacked showing how one can create a test friendly httpcontext.

I modified his example some and started using it in some tests; works very nice!

Here is another implementation based on Haack’s example that is supposed to also work with session.

I almost NEVER use session if I can avoid it, but still this could come in handy.