/// <summary> /// Coded by Gabrielle Legrand /// /// Checked By: Josh Jackson /// This is the Volunteer Manager method with logic for Retrieving the list of Volunteers by Active status /// /// </summary> /// <param name="active"></param> /// <returns></returns> ///<remarks> /// UPDATED BY: /// UPDATE DATE: /// CHANGE DESCRIPTION: /// </remarks> public List <Volunteer> RetrieveVolunteerListByActive(bool active = true) { try { return(_volunteerAccessor.SelectVolunteersByActive(active)); } catch (Exception ex) { throw new ApplicationException("Data not found.", ex); } }
public void TestRetrieveVolunteerListByActive() { // arrange List <Volunteer> selectedVolunteers = new List <Volunteer>(); const bool active = true; // act selectedVolunteers = _volunteerAccessor.SelectVolunteersByActive(active); // assert Assert.AreEqual(2, selectedVolunteers.Count); }