public void TestTopLevelDomain() { var baseUrl = new QUrl(); baseUrl.Scheme = "ftp"; baseUrl.SetAuthority("tray:[email protected]:2021"); baseUrl.SetFragment("#question13"); baseUrl.SetHost("ftp.example.com"); baseUrl.SetUserName("tray2"); baseUrl.SetPath("/pub/something/"); baseUrl.SetPort(2022); baseUrl.SetUrl(""); Assert.AreEqual(".com", baseUrl.TopLevelDomain()); }
public void TestUrl() { var baseUrl = new QUrl(); baseUrl.Scheme = "ftp"; baseUrl.SetAuthority("tray:[email protected]:2021"); baseUrl.SetFragment("#question13"); baseUrl.SetHost("ftp.example.com"); baseUrl.SetUserName("tray2"); baseUrl.SetPath("/pub/something/"); baseUrl.SetPort(2022); baseUrl.SetUrl(""); throw new AssertionException("Url() not implemented!"); //Assert.AreEqual(".com", baseUrl.Url()); }
public void TestSetUserInfo() { var baseUrl = new QUrl(); baseUrl.Scheme = "ftp"; baseUrl.SetAuthority("tray:[email protected]:2021"); baseUrl.SetFragment("#question13"); baseUrl.SetHost("ftp.example.com"); baseUrl.SetUserInfo("tray2:5uQQo_f2"); baseUrl.SetPath("/pub/something/"); baseUrl.SetPort(2022); baseUrl.SetUrl(""); Assert.AreEqual("tray2", baseUrl.UserName()); Assert.AreEqual("5uQQo_f2", baseUrl.Password()); Assert.AreEqual("tray2:5uQQo_f2", baseUrl.UserInfo()); }