public void UrlEncodeForUrl() { Assert.AreEqual(Alphanumerics, Alphanumerics.UrlEncodeForUrl()); Assert.AreEqual(Rfc3986_UnreservedChars, Rfc3986_UnreservedChars.UrlEncodeForUrl()); Assert.AreEqual(Rfc3986_ReservedChars, Rfc3986_ReservedChars.UrlEncodeForUrl()); Assert.AreEqual(Rfc3986_OtherChars.PercentEncode(), Rfc3986_OtherChars.UrlEncodeForUrl()); Assert.AreEqual("https://abc.xyz/%20!%22-0Aa%E3%81%82%2520", "https://abc.xyz/ !\"-0Aaあ%20".UrlEncodeForUrl()); }
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()); }