public void MutlipleSelection() { Form form = new ListBoxTestForm(); form.Show(); TestWriter writer = new TestWriter(form); Assert.Equal("", 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.Equal( @"[Fact] 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); }
public void SelectItem() { Form form = new ListBoxTestForm(); form.Show(); TestWriter writer = new TestWriter(form); Assert.Equal("", writer.Test); ListBoxTester myListBox = new ListBoxTester("myListBox", form); myListBox.Select(0); Assert.Equal( @"[Fact] public void Test() { ListBoxTester myListBox = new ListBoxTester(""myListBox""); myListBox.ClearSelected(); myListBox.SetSelected(0, true); //Red }", writer.Test); }
public void SingleSelectBox() { Form form = new ListBoxTestForm(); form.Show(); TestWriter writer = new TestWriter(form); Assert.Equal("", 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.Equal( @"[Fact] 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); }