Beispiel #1
0
        public void Test_PIGGREEK_TRANSLATION()
        {
            string             word = "test";
            PigGreekTranslator t    = new PigGreekTranslator();

            word = t.Translate(word);
            Assert.IsTrue(word == "esttoi");
        }
Beispiel #2
0
 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();
     }
 }
Beispiel #3
0
        public void Test_PIGGREEK_CONSTRUCTOR()
        {
            PigGreekTranslator pigGreek = new PigGreekTranslator();

            Assert.IsTrue(pigGreek.GetType() == typeof(PigGreekTranslator));
        }