public void ThenAProspectConstituencyIsAddedTo(string lastName, Table prospects) { lastName += uniqueStamp; GetConstituentPanel(lastName); foreach (var prospect in prospects.Rows) { if (!ConstituentPanel.ConstituencyExists(prospect)) { throw new ArgumentException(String.Format("Constituent page '{0}' does have prospect '{1}'", lastName, prospect)); } } }
public void ThenAFriendConstituencyIsAddedTo(string lastName, Table friends) { try { lastName += uniqueStamp; //The unique stamp is a series of numbers to keep constituents different from each other GetConstituentPanel(lastName); // open constituent panel for the one with the selected lastname foreach (var friend in friends.Rows) { if (!ConstituentPanel.ConstituencyExists(friend)) { throw new ArgumentException(String.Format("Constituent page '{0}' does not have constituent as friend '{1}'", lastName, friend)); } } } catch (Exception ex) { throw new Exception("Error: could not verify the addition of a friend constituency. " + ex.Message); } }
public void ThenAProspectConstituencyIsAddedTo(string lastName, Table prospects) { try { lastName += uniqueStamp; //The unique stamp is a series of numbers added to the end to keep names distinctive GetConstituentPanel(lastName); // open the constituent functional area and start search foreach (var prospect in prospects.Rows) // see if the constituent has prospect status { if (!ConstituentPanel.ConstituencyExists(prospect)) { throw new ArgumentException(String.Format("Constituent page '{0}' does have prospect '{1}'", lastName, prospect)); } } } catch (Exception ex) { throw new Exception("Error: could not determine that a prospect constituency was added. " + ex.Message); } }