Tag Archives: Mocking

One way to mock Request.QueryString and Request.Form

I often find it convenient to test Asp.Net MVC application on the controllers. One thing I find myself repeat over and over again is mocking the HttpContext and setting Request.QueryString and Request.Form values. It brings great value to the tests being able to test how the model binders behave given certains posted values or how [...]

Two nice tools for getting started with mocking and DI

Mocking and dependency injection can seem overwhelming the first time you read about and try to implement them. Two nice and clean frameworks are moq and ninject They are very easy to get into and both has good basic tutorials. For a beginner they cover what you want to do. I will try to show [...]