コード例 #1
0
ファイル: UrlEncodingTest.cs プロジェクト: sakapon/Harmonia
 public void UrlDecode()
 {
     Assert.AreEqual(Alphanumerics, Alphanumerics.UrlDecode());
     Assert.AreEqual(Rfc3986_UnreservedChars, Rfc3986_UnreservedChars.UrlDecode());
     Assert.AreEqual(Rfc3986_ReservedChars, Rfc3986_ReservedChars.UrlEncode().UrlDecode());
     Assert.AreEqual(Rfc3986_OtherChars, Rfc3986_OtherChars.UrlEncode().UrlDecode());
     Assert.AreEqual("https://abc.xyz/ !\"-0Aaあ%20", "https://abc.xyz/%20!%22-0Aa%E3%81%82%2520".UrlDecode());
 }
コード例 #2
0
ファイル: UrlEncodingTest.cs プロジェクト: sakapon/Harmonia
 public void UrlEncode()
 {
     Assert.AreEqual(Alphanumerics, Alphanumerics.UrlEncode());
     Assert.AreEqual(Rfc3986_UnreservedChars, Rfc3986_UnreservedChars.UrlEncode());
     Assert.AreEqual(Rfc3986_ReservedChars.PercentEncode(), Rfc3986_ReservedChars.UrlEncode());
     Assert.AreEqual(Rfc3986_OtherChars.PercentEncode(), Rfc3986_OtherChars.UrlEncode());
     Assert.AreEqual("%20%21%22-0Aa%E3%81%82", " !\"-0Aaあ".UrlEncode());
 }