Esempio n. 1
0
        public void MutlipleSelection()
        {
            Form form = new ListBoxTestForm();
            form.Show();
            TestWriter writer = new TestWriter(form);
            Assert.AreEqual("", writer.Test);

            ListBoxTester myListBox = new ListBoxTester("myListBox", form);

            myListBox.ClearSelected();
            myListBox.SetSelected(0, true); //Red
            myListBox.SetSelected(2, true); //Yellow
            myListBox.SetSelected(4, true); //Blue
            myListBox.SetSelected(6, true); //Violet

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

            ListBoxTester myListBox = new ListBoxTester(""myListBox"");

            myListBox.ClearSelected();
            myListBox.SetSelected(0, True); //Red
            myListBox.ClearSelected();
            myListBox.SetSelected(0, True); //Red
            myListBox.SetSelected(2, True); //Yellow
            myListBox.ClearSelected();
            myListBox.SetSelected(0, True); //Red
            myListBox.SetSelected(2, True); //Yellow
            myListBox.SetSelected(4, True); //Blue
            myListBox.ClearSelected();
            myListBox.SetSelected(0, True); //Red
            myListBox.SetSelected(2, True); //Yellow
            myListBox.SetSelected(4, True); //Blue
            myListBox.SetSelected(6, True); //Violet

            }",
                    writer.Test);
        }
Esempio n. 2
0
        public void SelectItem()
        {
            Form form = new ListBoxTestForm();
            form.Show();
            TestWriter writer = new TestWriter(form);
            Assert.AreEqual("", writer.Test);

            ListBoxTester myListBox = new ListBoxTester("myListBox", form);

            myListBox.Select(0);

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

            ListBoxTester myListBox = new ListBoxTester(""myListBox"");

            myListBox.ClearSelected();
            myListBox.SetSelected(0, True); //Red

            }",
                    writer.Test);
        }
Esempio n. 3
0
        public void SingleSelectBox()
        {
            Form form = new ListBoxTestForm();
            form.Show();
            TestWriter writer = new TestWriter(form);
            Assert.AreEqual("", writer.Test);

            ListBoxTester myListBox = new ListBoxTester("mySingleSelectBox", form);

            myListBox.ClearSelected();
            myListBox.SetSelected(0, true); //Red
            myListBox.SetSelected(2, true); //Yellow
            myListBox.SetSelected(4, true); //Blue
            myListBox.SetSelected(6, true); //Violet

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

            ListBoxTester mySingleSelectBox = new ListBoxTester(""mySingleSelectBox"");

            mySingleSelectBox.Select(0); //Can
            mySingleSelectBox.Select(2); //Select
            mySingleSelectBox.Select(4); //At
            mySingleSelectBox.Select(6); //Time

            }",
                    writer.Test);
        }