Re: Unit Testing and ASP.NET Resources

2010-09-10 Thread silky
On Fri, Sep 10, 2010 at 11:45 PM, Wallace Turner wrote: > *this is just a though* > > Are you testing HttpContext.Current.GetGlobalResource( ) itself or the code > up until that point? > > If the latter then could you replace all your GetGlobalResource( ) calls > with your own static method? You c

RE: Unit Testing and ASP.NET Resources

2010-09-10 Thread Wallace Turner
*this is just a though* Are you testing HttpContext.Current.GetGlobalResource( ) itself or the code up until that point? If the latter then could you replace all your GetGlobalResource( ) calls with your own static method? You could then use IoC to plugin in either the real GetGlobalResource or y

Unit Testing and ASP.NET Resources

2010-09-10 Thread silky
Has anyone done anything in this area? The problem is, when tests are run from your unit testing framework (NUnit in my case), the calls to HttpContext.Current.GetGlobalResource(...) fail, obviously because there is no current HttpContext, but also perhaps less obviously because the resources don'