Exemple #1
0
        static void Main(string[] args)
        {
            bool cont = true;

            while (cont)
            {
                Console.WriteLine("Beep-boop. Translate text. Boop.");
                string input = Console.ReadLine();

                Console.WriteLine("\nTranslation. Beep.");
                Console.WriteLine(PigLatin.Translate(input));

                Console.WriteLine("\nContinue?");
                input = Console.ReadLine();
                if (input == null || !input.ToLower().Equals("y"))
                {
                    cont = false;
                }
            }
        }
 public void TranslatesBlanks()
 {
     Assert.Equal("", PigLatin.Translate(""));
 }
 public void TranslatesVowelWords()
 {
     Assert.Equal("applesyay", PigLatin.Translate("apples"));
     Assert.Equal("ofyay", PigLatin.Translate("of"));
 }
 public void TranslatesAllConsonants()
 {
     Assert.Equal("rbrray", PigLatin.Translate("brrr"));
 }
 public void TranslatesPhrases()
 {
     Assert.Equal("urplepay eoplepay eateryay", PigLatin.Translate("purple people eater"));
     Assert.Equal("irefay uckstray", PigLatin.Translate("fire trucks"));
 }