Hello, > Unfortunately ASP.NET provides sealed HttpContext, HttpRequest, HttpResponse > which cannot be used to write mocks for testing (I love javax.servlet). > I considering to wrap this objects to complete Java Servlet API and use > this interfaces > for whole port implementation (except httphandler which will instantiate > wrapped objects) > and make port completely independent from System.Web. > At this time I wrap HttpContext, HttpRequest, HttpResponse into custom > classes which so close to original. > If it sounds wild, it's possible to use asp.net HttpContext, etc.., > but unfortunately it's a farewell to unit testing.
Not really, there is an alternative. Context, Request and Response are just wrappers on top of the low-level interface SimplerWorkerRequest. Look at how we write some of the tests in System.Web, where we basically fake this and we have complete control of what goes over. _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
