Esempio n. 1
0
 public void TestNormal()
 {
     var ub = new UrlBuilder("http://llf.hanzify.org/llf/search.asp");
     ub.Add("Where", "title");
     ub.Add("keyword", "DbEntry");
     string dst = ub.ToString();
     Assert.AreEqual("http://llf.hanzify.org/llf/search.asp?Where=title&keyword=DbEntry", dst);
 }
Esempio n. 2
0
 public void TestUnicodeAsDefault()
 {
     var ub = new UrlBuilder("http://llf.hanzify.org/llf/search.asp", Encoding.Unicode);
     ub.Add("Where", "title");
     ub.Add("keyword", "vb");
     string dst = ub.ToString();
     Assert.AreEqual("http://llf.hanzify.org/llf/search.asp?Where=t%00i%00t%00l%00e%00&keyword=v%00b%00", dst);
 }
Esempio n. 3
0
 public void TestChineseGbk()
 {
     var ub = new UrlBuilder("http://llf.hanzify.org/llf/search.asp");
     ub.Add("Where", "title");
     ub.Add("keyword", "中文", Util.GetGbkEncoding());
     string dst = ub.ToString();
     Assert.AreEqual("http://llf.hanzify.org/llf/search.asp?Where=title&keyword=%d6%d0%ce%c4", dst);
 }