public void TestMethod_DeleteSelectedItemsFromListbox()
        {
            ListBox source = new ListBox();

            source.Items.Add("item1");
            source.Items.Add("item2");
            source.Items.Add("item3");
            source.Items.Add("item4");
            source.SetSelected(0, true);
            WindowsHelper.DeleteSelectedItemsFromListbox(source);
            int expected = 3;
            int result   = source.Items.Count;

            Assert.AreEqual(result, expected);
        }
Example #2
0
 private void ButtonDeployDelete_Click(object sender, EventArgs e)
 {
     WindowsHelper.DeleteSelectedItemsFromListbox(listBoxToDeploy);
     EnableDisableButtons();
 }