public void a_url_with_extra_query_string_parameters_will_match()
        {
            var template           = new UriTemplate("/test?q={searchTerm}&p={pageNumber}&s={pageSize}");
            UriTemplateMatch match = template.Match(new Uri("http://localhost/"),
                                                    new Uri("http://localhost/test?q=test&p=1&s=10&contentType=json"));

            match.ShouldNotBeNull();
        }
        public void a_url_matching_result_in_the_query_value_variable_being_set()
        {
            var table = new UriTemplate("/test?query={queryValue}");
            UriTemplateMatch match =
                table.Match(new Uri("http://localhost"), new Uri("http://localhost/test?query=search"));

            match.ShouldNotBeNull();

            match.QueryStringVariables["queryValue"].ShouldBe("search");
        }
        public void a_url_matching_three_query_string_parameters_will_match()
        {
            var table = new UriTemplate("/test?q={searchTerm}&p={pageNumber}&s={pageSize}");
            UriTemplateMatch match =
                table.Match(new Uri("http://localhost"), new Uri("http://localhost/test?q=&p=1&s=10"));

            match.ShouldNotBeNull();
            match.QueryStringVariables["searchTerm"].ShouldBe(string.Empty);
            match.QueryStringVariables["pageNumber"].ShouldBe("1");
            match.QueryStringVariables["pageSize"].ShouldBe("10");
        }
        public void a_template_on_the_root_gets_a_match()
        {
            GivenAMatching("/", "http://localhost/");

            ThenTheMatch.ShouldNotBeNull();
        }