public void ConvertRubToUsd_TwentyNine()
        {
            String actual   = StrEdit.ConvertRubToUsd("twenty NINE");
            String expected = "fifty eight";

            Assert.AreEqual(expected, actual);
        }
        public void ConvertRubToUsd_NineThousandNineHundredNinetyNine()
        {
            String actual   = StrEdit.ConvertRubToUsd("Nine thousand nine hundred ninety NINE");
            String expected = "nineteen thousand nine hundred ninety eight";

            Assert.AreEqual(expected, actual);
        }
        public void ConvertRubToUsd_nine()
        {
            String actual   = StrEdit.ConvertRubToUsd("nine");
            String expected = "eighteen";

            Assert.AreEqual(expected, actual);
        }
Beispiel #4
0
        /*
         *     "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "hundred", "thousand",
         *      "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty",
         *      "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"
         */
        static void Main(string[] args)
        {
            int k = 0;

            while (k != 3)
            {
                Menu();
                string str = null;
                k = Convert.ToInt16(Console.ReadLine());
                switch (k)
                {
                case 1:
                    Console.Write("Введите предложение: ");
                    str = Console.ReadLine();
                    Console.WriteLine("Исправленное предложение: " + StrEdit.ConvertLettersUp(str));
                    break;

                case 2:
                    Console.Write("Enter the amount in rubles: ");
                    str = Console.ReadLine();
                    Console.WriteLine("Amount in usd: " + StrEdit.ConvertRubToUsd(str) + " $");
                    break;

                case 3:
                    break;

                default:
                    Console.WriteLine("Нет такого пункта!");
                    break;
                }
                Console.ReadKey();
            }
        }
        public void ConvertLetterToUp3()
        {
            String str1 = "Let's go to river. i want swiming";

            str1 = StrEdit.ConvertLettersUp(str1);
            String expected = "Let's go to river. I want swiming.";

            Assert.AreEqual(expected, str1);
        }
        public void ConvertLetterToUp2()
        {
            String str1 = "Рыбак ловит рыбу.   Плавец плывёт. человек побежал";

            str1 = StrEdit.ConvertLettersUp(str1);
            String expected = "Рыбак ловит рыбу. Плавец плывёт. Человек побежал.";

            Assert.AreEqual(expected, str1);
        }
        public void ConvertLetterToUp1()
        {
            String str1 = "Привет.         как дела";

            str1 = StrEdit.ConvertLettersUp(str1);
            String expected = "Привет. Как дела.";

            Assert.AreEqual(expected, str1);
        }