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

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