I came across an article today which showed some really good thinking in solving the problem of unit testing ASP.NET application functionality. Usually, testing ASP.NET apps involves issuing HTTP requests and comparing the response to some set of known values. This is really too far removed from the operations of individual methods and functions that one might write inside the classes of an ASP.NET application to be considered a unit test. However, code in these methods/functions frequently references objects such as the HttpContext object, and so tests exercising that code outside the context of an HTTP request have a tough time providing that context. This article shows how to do just that.