예제 #1
0
        public void TestDeactivateRecurringDonation()
        {
            // Arrange
            int result;
            int id = 2;

            // Act
            result = _donationManager.DeleteRecurringDonation(id);

            // Assert
            Assert.AreEqual(1, result);
        }
예제 #2
0
        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());
        }