Exemplo n.º 1
0
        public void add_http_method_constraint()
        {
            var route = new RouteDefinition("something");
            route.AddHttpMethodConstraint("get");

            route.GetHttpMethodConstraints().ShouldHaveTheSameElementsAs("GET");
        }
Exemplo n.º 2
0
 protected bool Equals(RouteDefinition other)
 {
     return string.Equals(_pattern, other._pattern, StringComparison.OrdinalIgnoreCase)
         && _constraints.SequenceEqual(other._constraints)
         && GetHttpMethodConstraints().SequenceEqual(other.GetHttpMethodConstraints());
 }
Exemplo n.º 3
0
 public void no_http_method_constraints_on_startup()
 {
     var route = new RouteDefinition("something");
     route.GetHttpMethodConstraints().Any().ShouldBeFalse();
 }
Exemplo n.º 4
0
 protected bool Equals(RouteDefinition other)
 {
     return(string.Equals(_pattern, other._pattern, StringComparison.OrdinalIgnoreCase) &&
            _constraints.SequenceEqual(other._constraints) &&
            GetHttpMethodConstraints().SequenceEqual(other.GetHttpMethodConstraints()));
 }