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")); }
public void TranslatesBlanks() { Assert.Equal("", PigLatin.Translate("")); }
public void TranslatesAllConsonants() { Assert.Equal("rbrray", PigLatin.Translate("brrr")); }
public void TranslatesVowelWords() { Assert.Equal("applesyay", PigLatin.Translate("apples")); Assert.Equal("ofyay", PigLatin.Translate("of")); }
public void TranslatesPhrases() { Assert.Equal("urplepay eoplepay eateryay", PigLatin.Translate("purple people eater")); Assert.Equal("irefay uckstray", PigLatin.Translate("fire trucks")); }