public void TestRecodeThreeWordRoundTripWithColon()
        {
            Recode recoder = new Recode();
            string data    = "ni: mije";
            string shorter = recoder.Shorten(data);

            Assert.AreEqual("ni: mj", shorter);
            string longer = recoder.ExpandTwoLetterWithSpaces(shorter);

            Assert.AreEqual(data, longer);
        }
        public void TestRecodeTwoWordRoundTripProperModifer()
        {
            Recode recoder = new Recode();
            string data    = "jan Mato";
            string shorter = recoder.Shorten(data);

            Assert.AreEqual("jn MATO", shorter);
            string longer = recoder.ExpandTwoLetterWithSpaces(shorter);

            Assert.AreEqual(data, longer);
        }
        public void TestRecodeTwoWordRoundTripPunctuate()
        {
            Recode recoder = new Recode();
            string data    = "soweli moku.";
            string shorter = recoder.Shorten(data);

            Assert.AreEqual("ow mk.", shorter);
            string longer = recoder.ExpandTwoLetterWithSpaces(shorter);

            Assert.AreEqual(data, longer);
        }
        public void TestRecodeThreeWordRoundTrip()
        {
            Recode recoder = new Recode();
            string data    = "soweli moku moku";
            string shorter = recoder.Shorten(data);

            Assert.AreEqual("ow mk mk", shorter, "Shorten failed");
            string longer = recoder.ExpandTwoLetterWithSpaces(shorter);

            Assert.AreEqual(data, longer, "Expand failed");
        }
        public void TestRecodeOneWordRoundTrip()
        {
            Recode recoder = new Recode();
            string data    = "soweli";
            string shorter = recoder.Shorten(data);

            Assert.AreEqual("ow", shorter);
            string longer = recoder.ExpandTwoLetterWithSpaces(shorter);

            Assert.AreEqual(data, longer);
        }
        protected void btnCompress_Click(object sender, EventArgs e)
        {
            string toConvert = Server.HtmlEncode(txtInput.Text);

            string result;

            result         = recoder.Shorten(toConvert);
            result        += "<br/><br/>" + result.Replace(" ", "").Trim().Replace("\n", "<br/>");;
            txtOutput.Text = result;

            result           = recoder.ShortenToJapanese2(toConvert);
            result          += "<br/><br/>" + result.Replace(" ", "").Trim().Replace("\n", "<br/>");;
            txtJapanese.Text = result;

            result          = recoder.ShortenToChinese(toConvert);
            result         += "<br/><br/>" + result.Replace(" ", "").Trim().Replace("\n", "<br/>");;
            txtChinese.Text = result;

            result                = recoder.ShortenToUnicode(toConvert);
            result               += "<br/><br/>" + result.Replace(" ", "").Trim().Replace("\n", "<br/>");;
            txtUnicode.Text       = result;
            outputSection.Visible = true;
        }