private bool ConstraintMatches(object constraintQueryString, object actualQueryString) { var mockContext = GetContext(new Hash(actualQueryString).ToNameValueCollection()); var constraint = new QueryStringConstraint(new Hash(constraintQueryString)); var route = GetRoute(constraint); return(constraint.Match(mockContext, route, "", new RouteValueDictionary(), RouteDirection.IncomingRequest)); }
private bool ConstraintMatches(object constraintQueryString, object routeValues) { var mockContext = MockRepository.GenerateStub <HttpContextBase>(); var constraint = new QueryStringConstraint(new Hash(constraintQueryString)); var route = GetRoute(constraint); var values = new RouteValueDictionary(routeValues); return(constraint.Match(mockContext, route, "", values, RouteDirection.UrlGeneration)); }