private class MockHttpContext : HttpContextBase
{
public override IPrincipal User { get; set; }
public override HttpRequestBase Request
{
get
{
return new MockRequestContext(); //base.Request;
}
}
}
private class MockRequestContext : HttpRequestBase
{
public override RequestContext RequestContext
{
get
{
return new RequestContext(); //base.RequestContext;
}
set
{
base.RequestContext = value;
}
}
public override HttpCookieCollection Cookies
{
get
{
return new HttpCookieCollection(); //base.Cookies;
}
}
}