示例#1
0
 public void ThenAPledgeExistsWithDesignations(Table designations)
 {
     foreach (var designation in designations.Rows)
     {
         if (!PledgePanel.DesignationExists(designation))
         {
             throw new ArgumentException(String.Format("Designation '{0}' does not exist for current pledge.",
                                                       designation));
         }
     }
 }
示例#2
0
 public void ThenTheRevenueRecordForHasDesignations(string constituent, Table designations)
 {
     WhenNavigateToTheRevenueRecordFor(constituent);
     foreach (var designation in designations.Rows)
     {
         if (!PledgePanel.DesignationExists(designation))
         {
             throw new ArgumentException(String.Format("Designation '{0}' does not exist for current pledge.",
                                                       designation));
         }
     }
 }
示例#3
0
 public void ThenAPledgeExistsForConstituentWithAmount(string constituent, string amount)
 {
     constituent += uniqueStamp;
     if (!PledgePanel.IsPledgeConstituent(constituent))
     {
         throw new ArgumentException(String.Format("Current pledge panel is not for constituent '{0}'",
                                                   constituent));
     }
     if (!PledgePanel.IsPledgeAmount(amount))
     {
         throw new ArgumentException(String.Format("Current pledge panel is not for amount '{0}'", amount));
     }
 }
示例#4
0
 public void ThenAPledgeExistsForConstituentWithAmount(string constituent, string amount)
 {
     //find the pledge for the given constituent at a certain amount
     constituent += uniqueStamp;   //The unique stamp is a series of numbers to keep constituents different from each other
     if (!PledgePanel.IsPledgeConstituent(constituent))
     {
         throw new ArgumentException(String.Format("Current pledge panel is not for constituent '{0}'",
                                                   constituent));
     }
     if (!PledgePanel.IsPledgeAmount(amount))
     {
         throw new ArgumentException(String.Format("Current pledge panel is not for amount '{0}'", amount));
     }
 }
示例#5
0
 public void ThenAPledgeExistsWithDesignations(Table designations)
 {
     try
     {
         foreach (var designation in designations.Rows)  //find the designations for the pledges in the batch
         {
             if (!PledgePanel.DesignationExists(designation))
             {
                 throw new ArgumentException(String.Format("Designation '{0}' does not exist for current pledge.",
                                                           designation));
             }
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not find a pledge with designations. " + ex.Message);
     }
 }
示例#6
0
 public void ThenTheRevenueRecordForHasDesignations(string constituent, Table designations)
 {
     try
     {
         WhenNavigateToTheRevenueRecordFor(constituent);
         foreach (var designation in designations.Rows)  //find out if a designation exists for a certain pledge
         {
             if (!PledgePanel.DesignationExists(designation))
             {
                 throw new ArgumentException(String.Format("Designation '{0}' does not exist for current pledge.",
                                                           designation));
             }
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not find the revenue record with designations. " + ex.Message);
     }
 }