public void FixtureSetUp () { app = new HttpApplication (); module = new DefaultAuthenticationModule (); }
/* stolen from the 1.0 S.W.Config ModulesConfiguration.cs */ internal HttpModuleCollection LoadModules (HttpApplication app) { HttpModuleCollection coll = new HttpModuleCollection (); Type type; foreach (HttpModuleAction item in Modules){ type = HttpApplication.LoadType (item.Type); if (type == null) { /* XXX should we throw here? */ continue; } IHttpModule module = (IHttpModule) Activator.CreateInstance (type, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, null, null, null); module.Init (app); coll.AddModule (item.Name, module); } /* XXX the 1.x config stuff does this * indirectly.. I'm not sure we want to do it * here, but this keeps things working in much * the same fashion in 2.0-land. */ { IHttpModule module = new DefaultAuthenticationModule (); module.Init (app); coll.AddModule ("DefaultAuthentication", module); } return coll; }