private Route GetRoute(QueryStringConstraint constraint)
 {
     return new Route("Patients/{id}",
         new RouteValueDictionary(new { action = "Update" }),
         new RouteValueDictionary(new { queryString = constraint }),
         new MonorailRouteHandler());
 }
 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);
 }