public void Setup() { _policy = new RouteConstraintPolicy(); _routeDefinition = MockRepository.GenerateMock<IRouteDefinition>(); _observer = new RecordingConfigurationObserver(); _policy.AddHttpMethodFilter(x => x.Method.Name.StartsWith("Query"), "GET"); _policy.AddHttpMethodFilter(x => x.Method.Name.EndsWith("Command"), "POST"); _argsToAddConstraint = _routeDefinition.CaptureArgumentsFor(r => r.AddRouteConstraint(null, null)); }
public void SetUp() { observer = new RecordingConfigurationObserver(); visitor = new BehaviorVisitor(observer, "reasontovisit"); chain = new BehaviorChain(); call = ActionCall.For<TestController>(c => c.SomeAction(null)); chain.AddToEnd(call); processor = MockRepository.GenerateMock<BehaviorProcessor>(); visitor.Actions += x => processor.Got(x); }
public void Setup() { _observer = new RecordingConfigurationObserver(); _action = ActionCall.For<ViewsForActionFilterTesterController>(x => x.AAction()); _fromFindsOne = new FakeViewToken(); _fromSecondFindsOne = new FakeViewToken(); _views = new ViewBag(new IViewToken[] { _fromFindsOne, _fromSecondFindsOne }); _filterThatFindsNone = createFilterThatReturns(new IViewToken[0]); _firstFilterThatFindsExactlyOne = createFilterThatReturns(_fromFindsOne); _secondFilterThatFindsExactlyOne = createFilterThatReturns(_fromSecondFindsOne); _filterThatFindsMultiple = createFilterThatReturns(_fromFindsOne, _fromSecondFindsOne); _viewAttacherConvention = new ViewAttacherConvention(); }
public void SetUp() { _method = ReflectionHelper.GetMethod<TestController>(c => c.SomeAction(null)); _policy = new DefaultRouteInputTypeBasedUrlPolicy(typeof(TestInputModel)); _log = new RecordingConfigurationObserver(); }