protected void DeleteButton_Click(object sender, EventArgs e) { String calendarToDelete = DeleteDropDown.SelectedValue; CalendarBLL calendarBLL = new CalendarBLL(); if (TopMostMessageBox.Show("Are you sure you want to delete " + calendarToDelete + "?", "Message", MessageBoxButtons.YesNo) == DialogResult.Yes) { calendarBLL.deleteCalendar(calendarToDelete); } DeleteCalendarPanel.Visible = false; InitPanel.Visible = true; }
public void deleteCalendarTest() { CalendarBLL target = new CalendarBLL(); string calendarToDelete = "UnitTestName"; bool expected = true; bool actual; actual = target.deleteCalendar(calendarToDelete); Assert.AreEqual(expected, actual); }