Пример #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");
 }