[Mono-list] Jakarta Struts for .net/mono

Carlos Ble carlosble at shidix.com
Fri Dec 15 14:08:12 EST 2006

El vie, 15-12-2006 a las 13:56 -0500, Miguel de Icaza escribió:
> 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.

Yup, I think that the MonoRail code uses the same approach. But is true
that the tests engine is not very good because of that inheritance

> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
Carlos Ble      

More information about the Mono-list mailing list