public Test_Authentication() { var httpContextApi = new API_Moq_HttpContext(); HttpContextFactory.Context = httpContextApi.HttpContextBase; adminUser = TMConfig.Current.DefaultAdminUserName; adminPwd = TMConfig.Current.DefaultAdminPassword; //HttpContextFactory.Current.SetCurrentUserRoles(UserGroup.Admin); //UserGroup.Admin.setThreadPrincipalWithRoles(); // set current user as Admin }
public Test_JavascriptCombiner() { BaseDir = "javascriptCombiner".tempDir(false); httpContextApi = new API_Moq_HttpContext(BaseDir); context = httpContextApi.httpContext(); request = context.Request; response = context.Response; HttpContextFactory.Context = context; }
public static HttpContextBase request_Write_Clear(this API_Moq_HttpContext moqHttpContext) { moqHttpContext.MockRequest.Setup(request => request.InputStream).Returns(new MemoryStream()); return(moqHttpContext.httpContext()); }
public static HttpContextBase httpContext(this API_Moq_HttpContext moqHttpContext) { return(moqHttpContext.HttpContextBase); }