Example #1
0
 public void AddQueryStringWithNullValueThrows()
 {
     Assert.Throws <ArgumentNullException>("value", () => QueryHelpers.AddQueryString("http://contoso.com/", "hello", null));
 }
Example #2
0
        public void AddQueryStringWithKeyAndValue(string uri, string expectedUri)
        {
            var result = QueryHelpers.AddQueryString(uri, "hello", "world");

            Assert.Equal(expectedUri, result);
        }
Example #3
0
        public void ParseEmptyOrNullQueryWorks(string?queryString)
        {
            var collection = QueryHelpers.ParseQuery(queryString);

            Assert.Empty(collection);
        }