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

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

            Assert.Empty(collection);
        }