示例#1
0
 public void should_strip_root_namespace_and_treat_child_namespaces_as_folders()
 {
     _policy
     .Build(HandlersObjectMother.HandlerCall())
     .Pattern
     .ShouldEqual("posts/create");
 }
示例#2
0
 public void should_constrain_routes_by_class_name_without_handler()
 {
     _policy
     .Build(HandlersObjectMother.HandlerCall())
     .AllowedHttpMethods
     .ShouldContain("GET");
 }
示例#3
0
 public void should_only_match_calls_with_handler_type_ending_with_handler()
 {
     _policy
     .Matches(HandlersObjectMother.HandlerCall())
     .ShouldBeTrue();
     _policy
     .Matches(HandlersObjectMother.NonHandlerCall())
     .ShouldBeFalse();
 }
示例#4
0
        public void should_only_match_calls_with_handler_type_ending_with_handler()
        {
            var log = new NulloConfigurationObserver();

            _policy
            .Matches(HandlersObjectMother.HandlerCall(), log)
            .ShouldBeTrue();
            _policy
            .Matches(HandlersObjectMother.NonHandlerCall(), log)
            .ShouldBeFalse();
        }
示例#5
0
 public void should_add_querystrings_to_route_for_handler_convention()
 {
     _policy
     .Build(HandlersObjectMother.HandlerCall())
     .Input.QueryParameters.First().Name.ShouldEqual("Input");
 }