Пример #1
0
        static void Main(string[] args)
        {
            string input;

            do
            {
                Console.WriteLine("Activating latent latin-like powers...");
                input = Console.ReadLine();

                Console.WriteLine("\nDid you mean:");
                Console.WriteLine(PigLatin.Translate(input));

                Console.WriteLine("\nContinue? (y/n)");
                input = Console.ReadLine();
                if (input == null)
                {
                    input = "";
                }

                Console.WriteLine();
            } while (input.ToLower().Equals("y"));
        }
Пример #2
0
 public void TranslatesBlanks()
 {
     Assert.Equal("", PigLatin.Translate(""));
 }
Пример #3
0
 public void TranslatesAllConsonants()
 {
     Assert.Equal("rbrray", PigLatin.Translate("brrr"));
 }
Пример #4
0
 public void TranslatesVowelWords()
 {
     Assert.Equal("applesyay", PigLatin.Translate("apples"));
     Assert.Equal("ofyay", PigLatin.Translate("of"));
 }
Пример #5
0
 public void TranslatesPhrases()
 {
     Assert.Equal("urplepay eoplepay eateryay", PigLatin.Translate("purple people eater"));
     Assert.Equal("irefay uckstray", PigLatin.Translate("fire trucks"));
 }