public void TestConstructUrlFromUri() { var uri = new Uri("http://watchdogapp.com/folder1/page1.html"); var url = new Url(uri); Assert.IsTrue(url.IsValid); Assert.AreEqual("http://watchdogapp.com/folder1/page1.html", url.ToString()); }
public void TestValidUrl() { var url = new Url("http://watchdogapp.com/folder1/page1.html"); Assert.IsTrue(url.IsValid); Assert.AreEqual("http://watchdogapp.com/folder1/page1.html", url.ToString()); url = new Url("http://gizmodo.com/5678421/11+inch-macbook-air-review-a-tiny-miracle"); Assert.IsTrue(url.IsValid); }
public void TestEmptyUrl() { var url = new Url(string.Empty); Assert.IsFalse(url.IsValid); Assert.AreEqual(string.Empty, url.ToString()); }
public void TestInvalidUrl() { var url = new Url("i'm invalid"); Assert.IsFalse(url.IsValid); Assert.AreEqual(string.Empty, url.ToString()); }