Пример #1
0
        public void TextBox()
        {
            TextBoxTestForm f = new TextBoxTestForm();

            f.Show();
            TextBoxTester box = new TextBoxTester("myTextBox");

            Assert.AreEqual("default", box.Text);
            box.Enter("Text");
            Assert.AreEqual("Text", box.Text);
            f.Close();
        }
Пример #2
0
        public void TextBox()
        {
            Form form = new TextBoxTestForm();

            form.Show();

            TextBoxTester box = new TextBoxTester("myTextBox", form);

            Assert.AreEqual("default", box.Text);

            Keyboard.UseOn(box);

            Keyboard.Click(Key.A);
            Keyboard.Click(Key.B);
            Keyboard.Click("+(c)");
            Keyboard.Click("C");

            Assert.AreEqual("abCC", box.Text);
        }