public void Setup() { moqHttpContext = new API_Moq_HttpContext(); context = HttpContextFactory.Context = moqHttpContext.httpContext(); //clean http request for each test Assert.NotNull(context.Session); context.Session["SessionID"] = userSessionId; handleUrlRequest = new HandleUrlRequest(); }
public TM_Rest_Direct() { SendEmails.Disable_EmailEngine = true; //TMConfig.Current.TMSetup.UseAppDataFolder = true; // set the TM XMl Database folder to be moq_HttpContext = new API_Moq_HttpContext(); HttpContextFactory.Context = moq_HttpContext.httpContext(); setDatabase(); TmRest = new TM_REST(); }
public void SetUp() { var assembly = this.type().Assembly; var dllLocation = assembly.CodeBase.subString(8); var webApplications = dllLocation.parentFolder().pathCombine(@"\..\..\.."); TMRestUser = new TM_REST(); var tmWebsite = webApplications.pathCombine("TM_Website"); moq_HttpContext = new API_Moq_HttpContext(tmWebsite); var tmConfig = TMConfig.Current; var credentials = new TM_Credentials { UserName = tmConfig.TMSecurity.Default_AdminUserName, Password = tmConfig.TMSecurity.Default_AdminPassword }; //login with default value var sessionId = TmRest.Login_using_Credentials(credentials); }
public void setup() { BaseDir = "javascriptCombiner".tempDir(false).createDir(); Assert.IsTrue (BaseDir.dirExists()); httpContextApi = new API_Moq_HttpContext(BaseDir); context = httpContextApi.httpContext(); request = context.Request; response = context.Response; HttpContextFactory.Context = context; }
public static HttpContextBase httpContext(this API_Moq_HttpContext moqHttpContext) { return(moqHttpContext.HttpContextBase); }