You referring to the HttpSimulator stuff? If so, +1

but beyond just that stuff "wrap the crap" rely on abstractions and wrap
away ugliness/concreteness behind an interface.

On Tue, Sep 1, 2009 at 11:25 AM, Tom Opgenorth <[email protected]> wrote:

>
> Phil Haack, about 1.5 ~2 years ago now, released some duck-typing
> stuff to put an interface around HttpContext and all those other
> sealed classes in ASP.NET.  I tried it out a while ago, it seemed to
> work not to bad.
>
> On Mon, Aug 31, 2009 at 07:36, shatl<[email protected]> wrote:
> >
> > You can take a look at implementation of HttpContextLocatorService and
> > IHttpContext in Web Client Software Factory.
> > Having interface you could easily mock it with RhinoMocks.
> >
> >
> > On Aug 28, 9:00 am, TheMightyKumquat <[email protected]> wrote:
> >> I'm running a lot of unit tests on a class inheriting from another
> >> class, where the base class' methods make a lot of calls involving
> >> HttpContext.Current.Session. When unit tests run, of course, they
> >> fail, because there is no HttpContext when the test is executed by the
> >> Visual Studio IDE.
> >>
> >> I've done a bit of Googling for a workaround and found a couple of
> >> things - something called HttpSimulator and also a Scott Hanselman
> >> blog page that discussed trying to simulate Session using Rhino Mocks,
> >> but I don't really understand the usage of either. Does anyone have
> >> experience trying to deal with Session in unit tests, and is there a
> >> "best practice" solution involving Rhino Mocks? I'd love to hear
> >> everyone's input.
> >
> > >
> >
>
>
>
> --
> http://www.opgenorth.net
>
> >
>


-- 
Tim Barcz
Microsoft ASPInsider
http://timbarcz.devlicio.us
http://www.twitter.com/timbarcz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rhinomocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to