public void ProgrammaticallyChangeTextIsNotRecorded()
        {
            Form form = new TextBoxTestForm();
            form.Show();
            TestWriter writer = new TestWriter(form);
            Assert.AreEqual("", writer.Test);

            TextBoxTester textBox = new TextBoxTester("myTextBox", form);
            textBox.Properties.Text = "abc";

            Assert.AreEqual(@"", writer.Test);
        }
        public void ProgrammaticallyChangeTextIsNotRecordedTwoBoxes()
        {
            Form form = new TextBoxTestForm();
            form.Show();
            TestWriter writer = new TestWriter(form);
            Assert.AreEqual("", writer.Test);

            TextBoxTester anotherBox = new TextBoxTester("anotherTextBox", form);
            anotherBox.FireEvent("Enter");

            TextBoxTester textBox = new TextBoxTester("myTextBox", form);
            textBox.Properties.Text = "abc";

            anotherBox.FireEvent("Leave");

            Assert.AreEqual(@"", writer.Test);
        }
        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);
        }
        public void TextBoxEnter()
        {
            Form form = new TextBoxTestForm();
            form.Show();
            TestWriter writer = new TestWriter(form);
            Assert.AreEqual("", writer.Test);

            TextBoxTester textBox = new TextBoxTester("myTextBox", form);
            //doing 2 of these tests the collapsing processor.
            textBox.Enter("abc");
            textBox.Enter("abcd");

            Assert.AreEqual(
                @"[Test]
            public void Test()
            {

            TextBoxTester myTextBox = new TextBoxTester(""myTextBox"");

            myTextBox.Enter(""abcd"");

            }",
                writer.Test);
        }
        public void TextBoxEnterMultiline()
        {
            Form form = new TextBoxTestForm();
            form.Show();
            TestWriter writer = new TestWriter(form);
            Assert.AreEqual("", writer.Test);

            TextBoxTester textBox = new TextBoxTester("myTextBox", form);
            textBox.Properties.Multiline = true;

            textBox.Enter("abc\nabcd\nabcde");

            Assert.AreEqual(
                @"[Test]
            public void Test()
            {

            TextBoxTester myTextBox = new TextBoxTester(""myTextBox"");

            myTextBox.Enter(""abc\nabcd\nabcde"");

            }",
                writer.Test);
        }
        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);
        }