示例#1
0
        public void GlyphsFormatTestEnDash()
        {
            string text     = "Observe - tiny and brief.";
            string expected = "Observe – tiny and brief.";

            GlyphBlockModifier f      = new GlyphBlockModifier();
            string             actual = f.ModifyLine(text);

            Assert.AreEqual(expected, actual);
        }
示例#2
0
        public void GlyphsFormatTestAcronym()
        {
            string text     = "We use CSS(Cascading Style Sheets).";
            string expected = "We use <acronym title=\"Cascading Style Sheets\">CSS</acronym>.";

            GlyphBlockModifier f      = new GlyphBlockModifier();
            string             actual = f.ModifyLine(text);

            Assert.AreEqual(expected, actual);
        }
示例#3
0
        public void GlyphsFormatTestEmDash()
        {
            string text     = "Observe -- very nice!";
            string expected = "Observe &#8212; very nice!";

            GlyphBlockModifier f      = new GlyphBlockModifier();
            string             actual = f.ModifyLine(text);

            Assert.AreEqual(expected, actual);
        }
示例#4
0
        public void GlyphsFormatTestSimpleQuotes()
        {
            string text     = "'Observe!'";
            string expected = "&#8216;Observe!&#8217;";

            GlyphBlockModifier f      = new GlyphBlockModifier();
            string             actual = f.ModifyLine(text);

            Assert.AreEqual(expected, actual);
        }
示例#5
0
        public void GlyphsFormatTestEllipsis()
        {
            string text     = "Observe...";
            string expected = "Observe&#8230;";

            GlyphBlockModifier f      = new GlyphBlockModifier();
            string             actual = f.ModifyLine(text);

            Assert.AreEqual(expected, actual);
        }
示例#6
0
        public void GlyphsFormatTestMultipleGlyphs()
        {
            string text     = "\"'I swear, captain,' replied I.\"";
            string expected = "&#8220;&#8216;I swear, captain,&#8217; replied I.&#8221;";

            GlyphBlockModifier f      = new GlyphBlockModifier();
            string             actual = f.ModifyLine(text);

            Assert.AreEqual(expected, actual);
        }
示例#7
0
        public void GlyphsFormatTestDoubleQuotes()
        {
            string text     = "Go and \"Observe!\", youg man.";
            string expected = "Go and &#8220;Observe!&#8221;, youg man.";

            GlyphBlockModifier f      = new GlyphBlockModifier();
            string             actual = f.ModifyLine(text);

            Assert.AreEqual(expected, actual);
        }
示例#8
0
        public void GlyphFormatTestCopyrightAtBeginningOfLine()
        {
            string text     = "(c) Company";
            string expected = "&#169; Company";

            GlyphBlockModifier f      = new GlyphBlockModifier();
            string             actual = f.ModifyLine(text);

            Assert.AreEqual(expected, actual);
        }
示例#9
0
        public void GlyphsFormatTestCopyright()
        {
            string text     = "three(C).";
            string expected = "three&#169;.";

            GlyphBlockModifier f      = new GlyphBlockModifier();
            string             actual = f.ModifyLine(text);

            Assert.AreEqual(expected, actual);
        }
示例#10
0
        public void GlyphsFormatTestRegistered()
        {
            string text     = "two(R).";
            string expected = "two&#174;.";

            GlyphBlockModifier f      = new GlyphBlockModifier();
            string             actual = f.ModifyLine(text);

            Assert.AreEqual(expected, actual);
        }
示例#11
0
        public void GlyphsFormatTestTrademark()
        {
            string text     = "one(TM).";
            string expected = "one&#8482;.";

            GlyphBlockModifier f      = new GlyphBlockModifier();
            string             actual = f.ModifyLine(text);

            Assert.AreEqual(expected, actual);
        }
示例#12
0
        public void GlyphsFormatTestDimensionSign()
        {
            string text     = "Observe: 2 x 2.";
            string expected = "Observe: 2 &#215; 2.";

            GlyphBlockModifier f      = new GlyphBlockModifier();
            string             actual = f.ModifyLine(text);

            Assert.AreEqual(expected, actual);
        }