public void Test_PIGGREEK_TRANSLATION() { string word = "test"; PigGreekTranslator t = new PigGreekTranslator(); word = t.Translate(word); Assert.IsTrue(word == "esttoi"); }
private void button1_Click(object sender, EventArgs e) { if (Validator.IsPresent(txtEnglish.Text)) { if (rdoPigGreek.Checked) { PigGreekTranslator pig = new PigGreekTranslator(txtEnglish.Text); txtTranslation.Text = pig.Translate(); } else if (rdoPigLatin.Checked) { PigLatinTranslator pigLatin = new PigLatinTranslator(txtEnglish.Text); txtTranslation.Text = pigLatin.Translate(); } } else { MessageBox.Show("Please enter text to be translated", "Invalid Entry", MessageBoxButtons.OK, MessageBoxIcon.Error); txtEnglish.Focus(); } }