public void LogIn_Test1() { TextWriter tw = new StringWriter(); wr = new TestWorkerRequest("/appinternals/logIn", "ticket=ST-8446-eCdNmuxCOLqAlsYUm4Ml-sso01.example.org", tw); wr.SetRemoteAddress("127.0.0.1"); wr.SetQueryString("ticket=ST-8446-eCdNmuxCOLqAlsYUm4Ml-sso01.example.org"); wr.SetCookie("ticket=ST-8446-eCdNmuxCOLqAlsYUm4Ml-sso01.example.org"); HttpContext.Current = new HttpContext(wr); try { authorization.Object.LogIn(); } catch (Exception ex) { } }
public void Logout_1Test() { TextWriter tw = new StringWriter(); wr = new TestWorkerRequest("/appinternals/logout", "", tw); wr.SetRemoteAddress("127.0.0.1"); HttpContext.Current = new HttpContext(wr); wr.SetCookie("cfx_aurz=" + GenCookieVal()); wr.SetHost("cms.fx.fws.qa.nt.ctripcorp.com"); wr.SetRemoteAddress("172.16.144.2"); try { authorization.Object.LogOut(); } catch (Exception ex) { } }