コード例 #1
0
 public void Setup()
 {
     _policy = new RouteConstraintPolicy();
     _routeDefinition = new RouteDefinition("something");
     _observer = new RecordingConfigurationObserver();
     _policy.AddHttpMethodFilter(x => x.Method.Name.StartsWith("Query"), "GET");
     _policy.AddHttpMethodFilter(x => x.Method.Name.EndsWith("Command"), "POST");
 }
コード例 #2
0
 public void Setup()
 {
     _policy          = new RouteConstraintPolicy();
     _routeDefinition = new RouteDefinition("something");
     _observer        = new RecordingConfigurationObserver();
     _policy.AddHttpMethodFilter(x => x.Method.Name.StartsWith("Query"), "GET");
     _policy.AddHttpMethodFilter(x => x.Method.Name.EndsWith("Command"), "POST");
 }
コード例 #3
0
        public void SetUp()
        {
            observer = new RecordingConfigurationObserver();
            graph    = new BehaviorGraph(observer);
            chain    = new BehaviorChain();
            lastCall = null;

            resolver = new RouteDefinitionResolver();
        }
コード例 #4
0
        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));
        }
コード例 #5
0
 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();
 }
コード例 #6
0
        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);
        }
コード例 #7
0
 public void SetUp()
 {
     _method = ReflectionHelper.GetMethod <TestController>(c => c.SomeAction(null));
     _policy = new DefaultRouteInputTypeBasedUrlPolicy(typeof(TestInputModel));
     _log    = new RecordingConfigurationObserver();
 }
コード例 #8
0
 public void SetUp()
 {
     _method = ReflectionHelper.GetMethod<TestController>(c => c.SomeAction(null));
     _policy = new DefaultRouteInputTypeBasedUrlPolicy(typeof (TestInputModel));
     _log = new RecordingConfigurationObserver();
 }