Beispiel #1
0
 /// <summary>
 /// Set the date that the test is being ignored until
 /// </summary>
 /// <param name="datetime">The date that the test is being ignored until</param>
 /// <returns>A modified TestCaseData.</returns>
 public TestCaseData Until(DateTimeOffset datetime)
 {
     if (_prevRunState != RunState.NotRunnable)
     {
         if (datetime > DateTimeOffset.UtcNow)
         {
             RunState = RunState.Ignored;
             string reason = (string)Properties.Get(PropertyNames.SkipReason);
             Properties.AddIgnoreUntilReason(datetime, reason);
         }
         else
         {
             RunState = _prevRunState;
         }
         Properties.Set(PropertyNames.IgnoreUntilDate, datetime.ToString("u"));
     }
     return(this);
 }