A test like so would pass:
string url = "http://example.com/whatever?foo=bar&baz=qux"; Uri uri = new Uri(url); Assert.AreEqual(uri.Host, "example.com");
No comments:
Post a Comment