public void add_http_method_constraint() { var route = new RouteDefinition("something"); route.AddHttpMethodConstraint("get"); route.GetHttpMethodConstraints().ShouldHaveTheSameElementsAs("GET"); }
protected bool Equals(RouteDefinition other) { return string.Equals(_pattern, other._pattern, StringComparison.OrdinalIgnoreCase) && _constraints.SequenceEqual(other._constraints) && GetHttpMethodConstraints().SequenceEqual(other.GetHttpMethodConstraints()); }
public void no_http_method_constraints_on_startup() { var route = new RouteDefinition("something"); route.GetHttpMethodConstraints().Any().ShouldBeFalse(); }
protected bool Equals(RouteDefinition other) { return(string.Equals(_pattern, other._pattern, StringComparison.OrdinalIgnoreCase) && _constraints.SequenceEqual(other._constraints) && GetHttpMethodConstraints().SequenceEqual(other.GetHttpMethodConstraints())); }