Beispiel #1
0
        public void RichText_Encode_4()
        {
            UnicodeRange range = UnicodeRange.LatinExtended;

            Assert.AreEqual("\\u1055?\\u1088?\\u1080?\\u1074?\\u1077?\\u1090?",
                            RichText.Encode("Привет", range));
        }
Beispiel #2
0
        public void RichText_Encode_3()
        {
            UnicodeRange range = UnicodeRange.Cyrillic;

            Assert.AreEqual("Hello", RichText.Encode("Hello", range));
            Assert.AreEqual("Привет", RichText.Encode("Привет", range));
        }
Beispiel #3
0
 public void RichText_Encode_1()
 {
     Assert.AreEqual(null, RichText.Encode(null, null));
     Assert.AreEqual("", RichText.Encode("", null));
     Assert.AreEqual("Hello", RichText.Encode("Hello", null));
     Assert.AreEqual("\\{\\}", RichText.Encode("{}", null));
     Assert.AreEqual("Hel\\\\lo", RichText.Encode("Hel\\lo", null));
 }
Beispiel #4
0
 public void RichText_Encode_2()
 {
     Assert.AreEqual("Hello,\\'0aWorld!", RichText.Encode("Hello,\nWorld!", null));
     Assert.AreEqual("Copyright \\'a9 2017", RichText.Encode("Copyright © 2017", null));
 }