Exemplo n.º 1
0
        public static void HtmlDecodeTest(string str)
        {
            try
            {
                // Performs encryption using the components touryo.
                string strValue = CustomEncode.HtmlEncode(str);

                // Performs decrypted using the components touryo.
                string str1 = CustomEncode.HtmlDecode(strValue);

                // Check whether it is decrypted into the original string.
                Assert.AreEqual(str, str1);
            }
            catch (Exception ex)
            {
                // Print a stack trace when an exception occurs.
                Console.WriteLine(ex.StackTrace);
                throw;
            }
        }