public override void Given() { constraint = new AreaConstraint(new TestAreaRegistration()); var routeData = new RouteData(); var httpContextBase = CreateStub <HttpContextBase>(); httpContextBase.Stub(x => x.Request).Return(CreateStub <HttpRequestBase>()); controllerContext = new ControllerContext { RequestContext = new RequestContext(httpContextBase, routeData), }; }
public override void Given() { constraint = new AreaConstraint(new TestAreaRegistration()); var routeData = new RouteData(); routeData.DataTokens.Add("area", "Test2"); routeData.Values.Add("area", "Test2"); var httpContextBase = CreateStub<HttpContextBase>(); httpContextBase.Stub(x => x.Request).Return(CreateStub<HttpRequestBase>()); controllerContext = new ControllerContext { RequestContext = new RequestContext(httpContextBase, routeData), }; }