public void TestMixedCaseDomainSansSubDomains() { var url = new Url("http://WWW.EBAY.CO.UK/"); Assert.AreEqual("ebay.co.uk", url.DomainSansSubDomain); }
public void TestFullPageWhenJustADomainWithATrailingSlash() { var url = new Url("http://www.watchdogapp.com/"); Assert.AreEqual("Site Root", url.FullPage); }
public void TestLongDomainSansSubDomains() { var url = new Url("http://www.sales.stores.ebay.co.uk/"); Assert.AreEqual("ebay.co.uk", url.DomainSansSubDomain); }
public void TestDomainWhenSubdomainIsSpecified() { var url = new Url("http://sub.watchdogapp.com/folder1/page1.html"); Assert.AreEqual("sub.watchdogapp.com", url.Domain); }
public void TestDomainWithHttpsProtocolOnNonStandardPort() { var url = new Url("https://watchdogapp.com:666/folder1/page1.html"); Assert.AreEqual("https://watchdogapp.com:666", url.DomainWithProtocol); }
public void TestGetTldWhenTldPartOfSubdomain() { var url = new Url("http://company.watchdogapp.org"); Assert.AreEqual("org", url.Tld); }
public void TestDomain() { var url = new Url("http://watchdogapp.com/folder1/page1.html"); Assert.AreEqual("watchdogapp.com", url.Domain); }
public void TestPathWithTwoFolderDeep() { var url = new Url("http://www.watchdogapp.com/folder/second/"); Assert.AreEqual("/folder/second/", url.Path); }
public void TestPathWithFilenameDeep() { var url = new Url("http://www.watchdogapp.com/folder/second/page.html"); Assert.AreEqual("/folder/second/", url.Path); }
public void TestFullPageWithQueryStringWhenNoQuery() { var url = new Url("http://www.watchdogapp.com/folder1/page1.html"); Assert.AreEqual("/folder1/page1.html", url.FullPageWithQueryString); }
public void TestPathWithRootDomain() { var url = new Url("http://www.watchdogapp.com"); Assert.AreEqual("/", url.Path); }
public void TestFullPageWithQueryString() { var url = new Url("http://www.watchdogapp.com/folder1/page1.html?parameter=first"); Assert.AreEqual("/folder1/page1.html?parameter=first", url.FullPageWithQueryString); }
public void TestPageWhenJustADomain() { var url = new Url("http://www.watchdogapp.com"); Assert.AreEqual("Site Root", url.Page); }
public void TestPage() { var url = new Url("http://www.watchdogapp.com/folder1/page1.html"); Assert.AreEqual("page1.html", url.Page); }
public void TestNoDomainSansSubDomains() { var url = new Url("http:///search?id=50"); Assert.AreEqual(string.Empty, url.DomainSansSubDomain); }
public void TestToStringWithQueryAndFragmentNoQueryNoFragment() { var url = new Url("http://www.google.com"); Assert.AreEqual("http://www.google.com/", url.ToStringWithQueryAndFragment()); }
public void TestDomainWithoutSubdomainWhenNoSubdomain() { var url = new Url("http://www.eed.eg/index.html"); Assert.AreEqual("eed.eg", url.DomainSansSubDomain); }
public void TestToStringWithQueryAndFragmentHasQueryNoFragment() { var url = new Url("http://www.google.com").AddToQuery("page", 5); Assert.AreEqual("http://www.google.com/?page=5", url.ToStringWithQueryAndFragment()); }
public void TestSubdomianWhenTldPartofSubdomain() { var url = new Url("http://company.watchdogapp.com"); Assert.AreEqual("company", url.SubDomain); }
public void TestToStringWithQueryAndFragmentRemoveQuery() { var url = new Url("http://www.google.com/?page=5").RemoveFromQuery("page"); Assert.AreEqual("http://www.google.com/", url.ToStringWithQueryAndFragment()); }
public void TestDomainOnNonStandardPort() { var url = new Url("http://watchdogapp.com:8080/folder1/page1.html"); Assert.AreEqual("watchdogapp.com:8080", url.Domain); }
public void TestDomainSansSubDomains() { var url = new Url("http://www.news.bbc.co.uk/"); Assert.AreEqual("bbc.co.uk", url.DomainSansSubDomain); }
public void TestDomainWithHttpProtocol() { var url = new Url("http://watchdogapp.com/folder1/page1.html"); Assert.AreEqual("http://watchdogapp.com", url.DomainWithProtocol); }
public void TestSingleDomainSansSubDomains() { var url = new Url("http://stackoverflow.com/"); Assert.AreEqual("stackoverflow.com", url.DomainSansSubDomain); }
public void TestDomainWithoutWwwPrefix() { var url = new Url("http://www.watchdogapp.com/folder1/page1.html"); Assert.AreEqual("watchdogapp.com", url.DomainSansWww); }
public void TestDomainWithoutWwwPrefixWhenSubdomainPresent() { var url = new Url("http://sub.watchdogapp.com/folder1/page1.html"); Assert.AreEqual("sub.watchdogapp.com", url.DomainSansWww); }