public void TestSetHost() { var baseUrl = new QUrl(); baseUrl.Scheme = "ftp"; baseUrl.SetAuthority("tray:[email protected]:2021"); baseUrl.SetFragment("#question13"); baseUrl.SetHost("ftp.example2.com"); Assert.AreEqual("ftp.example2.com", baseUrl.Host()); }
public void TestSetPath() { var baseUrl = new QUrl(); baseUrl.Scheme = "ftp"; baseUrl.SetAuthority("tray:[email protected]:2021"); baseUrl.SetFragment("#question13"); baseUrl.SetHost("ftp.example.com"); baseUrl.SetPassword("5uQQo_f2"); baseUrl.SetPath("/pub/something/"); Assert.AreEqual("/pub/something/", baseUrl.Path()); }
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 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 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 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()); }
public void TestSetQuery2() { var baseUrl = new QUrl(); baseUrl.Scheme = "ftp"; baseUrl.SetAuthority("tray:[email protected]:2021"); baseUrl.SetFragment("#question13"); baseUrl.SetHost("ftp.example.com"); baseUrl.SetPassword("5uQQo_f2"); baseUrl.SetPath("/pub/something/"); baseUrl.SetPort(2022); baseUrl.SetQuery(new QUrlQuery("new")); Assert.AreEqual("new", baseUrl.Query()); }
public void TestSetPassword() { var baseUrl = new QUrl(); baseUrl.Scheme = "ftp"; baseUrl.SetAuthority("tray:[email protected]:2021"); baseUrl.SetFragment("#question13"); baseUrl.SetHost("ftp.example.com"); baseUrl.SetPassword("5uQQo_f2"); Assert.AreEqual("5uQQo_f2", baseUrl.Password()); }