protected void DeleteEvent(object sender, EventArgs e) { for (int i = 0; i < DeleteEventCheckBox.Items.Count; i ++) { if (DeleteEventCheckBox.Items[i].Selected) { String eventName = DeleteEventCheckBox.Items[i].Text; CalendarBLL calendarBLL = new CalendarBLL(); System.Diagnostics.Trace.WriteLine(eventName); if (calendarBLL.deleteEventsByName(eventName)) { TopMostMessageBox.Show(eventName + " successfully deleted.", "message"); } else { TopMostMessageBox.Show("Could not delete " + eventName + ".", "message"); } } } DeleteEventPanel.Visible = false; InitPanel.Visible = true; }
public void deleteEventsByNameTest() { CalendarBLL target = new CalendarBLL(); // TODO: Initialize to an appropriate value string eventName = string.Empty; // TODO: Initialize to an appropriate value bool expected = false; // TODO: Initialize to an appropriate value bool actual; actual = target.deleteEventsByName(eventName); Assert.AreEqual(expected, actual); }