コード例 #1
0
        public void ArabicTextIsSuccessfulyConverted()
        {
            const string input    = "هَذَا النَّص العربي";
            const string expected = "ﻲﺑﺮﻌﻟا ﺺﱠﻨﻟا اَﺬَﻫ";

            string result = RTLSupport.FixRTL(input, false, false, false);

            Assert.AreEqual(expected, result);
        }
コード例 #2
0
        public void TashkeelIsMaintainedInMiddleOfText()
        {
            const string input    = "مَرد";
            const string expected = "دﺮَﻣ";

            string result = RTLSupport.FixRTL(input, false, false, false);

            Assert.AreEqual(expected, result);
        }
コード例 #3
0
        public void TashkeelIsMaintainedInEndOfText()
        {
            const string input    = "صبحِ";
            const string expected = "ِﺢﺒﺻ";

            string result = RTLSupport.FixRTL(input, false, false, false);

            Assert.AreEqual(expected, result);
        }
コード例 #4
0
        public void TashkeelIsMaintainedInBeginingOfText()
        {
            const string input    = "ِصبا";
            const string expected = "ِﺎﺒﺻ";;

            string result = RTLSupport.FixRTL(input, false, false, false);

            Assert.AreEqual(expected, result);
        }
コード例 #5
0
        public void FarsiTextIsSuccessfulyConverted()
        {
            const string input    = "متن فارسی";
            const string expected = "ﯽﺳرﺎﻓ ﻦﺘﻣ";

            string result = RTLSupport.FixRTL(input, false, false, true);

            Assert.AreEqual(expected, result);
        }
コード例 #6
0
        public void TashkeelIsMaintainedInEndOfText()
        {
            const string input    = "صبحِ";
            const string expected = "ِﺢﺒﺻ";

            var support = new RTLSupport
            {
                Farsi = true, PreserveNumbers = true, FixTextTags = false
            };

            string result = support.FixRTL(input);

            Assert.AreEqual(expected, result);
        }
コード例 #7
0
        public void FarsiTextIsSuccessfulyConverted()
        {
            const string input    = "متن فارسی";
            const string expected = "ﯽﺳرﺎﻓ ﻦﺘﻣ";

            var support = new RTLSupport
            {
                Farsi = true, PreserveNumbers = true, FixTextTags = false
            };

            string result = support.FixRTL(input);

            Assert.AreEqual(expected, result);
        }
コード例 #8
0
        public void ArabicTextIsSuccessfulyConverted()
        {
            const string input    = "هَذَا النَّص العربي";
            const string expected = "ﻲﺑﺮﻌﻟا ﺺﱠﻨﻟا اَﺬَﻫ";

            var support = new RTLSupport
            {
                Farsi = false, PreserveNumbers = true, FixTextTags = false
            };

            string result = support.FixRTL(input);

            Assert.AreEqual(expected, result);
        }