Ejemplo n.º 1
0
 public void ThenAnEventExistsWithTheNameStartDateAndLocation(string eventName, string startDate, string location)
 {
     eventName += uniqueStamp;
     if (!EventPanel.IsEventName(eventName))
     {
         throw new ArgumentException("Current event does not have the name " + eventName);
     }
     if (!EventPanel.IsStartDate(startDate))
     {
         throw new ArgumentException("Current event does not have the start date " + startDate);
     }
     if (!EventPanel.IsLocation(location))
     {
         throw new ArgumentException("Current event does not have the location " + location);
     }
 }
Ejemplo n.º 2
0
 public void ThenAnEventExistsWithTheNameStartDate(string eventName, string startDate)
 {
     try
     {
         if (eventName.Substring(0, 3) != "UDO")
         {
             eventName += uniqueStamp;   // the unique stamp is a series of numbers to keep names different from each other
         }
         if (!EventPanel.IsEventName(eventName))
         {
             throw new ArgumentException("Current event does not have the name " + eventName);
         }
         if (!EventPanel.IsStartDate(startDate))
         {
             throw new ArgumentException("Current event does not have the start date " + startDate);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not find an event with a particular name and start date. " + ex.Message);
     }
 }