public void TestDeactivateRecurringDonation() { // Arrange int result; int id = 2; // Act result = _donationManager.DeleteRecurringDonation(id); // Assert Assert.AreEqual(1, result); }
public ActionResult CancelRecurringDonation(int id, FormCollection collection) { int result = 0; if (ModelState.IsValid) { try { result = _donationManager.DeleteRecurringDonation(id); if (result == 1) { return(RedirectToAction("ActiveDonations")); } } catch { return(View()); } } return(View()); }