public void IgnoreAttributeWithUntilAddsIgnoreUntilDatePropertyPastUntilDate()
 {
     var ignoreAttribute = new IgnoreAttribute("BECAUSE");
     ignoreAttribute.Until = "1242-01-01";
     ignoreAttribute.ApplyToTest(test);
     Assert.That(test.Properties.Get(PropertyNames.IgnoreUntilDate), Is.EqualTo("1242-01-01 00:00:00Z"));
 }
 public void IgnoreAttributeIgnoresTestUntilDateTimeSpecified()
 {
     var ignoreAttribute = new IgnoreAttribute("BECAUSE");
     ignoreAttribute.Until = "4242-01-01 12:00:00Z";
     ignoreAttribute.ApplyToTest(test);
     Assert.That(test.RunState, Is.EqualTo(RunState.Ignored));
 }
 public void IgnoreAttributeWithInvalidDateThrowsException()
 {
     var ignoreAttribute = new IgnoreAttribute("BECAUSE");
     Assert.Throws<FormatException>(() => ignoreAttribute.Until = "Thursday the twenty fifth of December");
 }
 public void IgnoreAttributeUntilSetsTheReason(string date)
 {
     var ignoreAttribute = new IgnoreAttribute("BECAUSE");
     ignoreAttribute.Until = date;
     ignoreAttribute.ApplyToTest(test);
     Assert.That(test.Properties.Get(PropertyNames.SkipReason), Is.EqualTo("Ignoring until 4242-01-01 00:00:00Z. BECAUSE"));
 }
 public void IgnoreAttributeMarksTestAsRunnableAfterUntilDatePasses()
 {
     var ignoreAttribute = new IgnoreAttribute("BECAUSE");
     ignoreAttribute.Until = "1492-01-01";
     ignoreAttribute.ApplyToTest(test);
     Assert.That(test.RunState, Is.EqualTo(RunState.Runnable));
 }
 public void IgnoreAttributeWithoutReasonSetsTheReason(string date, string reason)
 {
     var ignoreAttribute = new IgnoreAttribute();
     ignoreAttribute.Until = date;
     ignoreAttribute.ApplyToTest(test);
     Assert.That(test.Properties.Get(PropertyNames.SkipReason), Is.EqualTo("Ignoring until 4242-01-01 00:00:00Z"));
 }
 public void IgnoreAttributeWithReasonDoesNotOverwriteTheReason()
 {
     var ignoreAttribute = new IgnoreAttribute("BECAUSE");
     ignoreAttribute.Until = "4242-01-01";
     ignoreAttribute.ApplyToTest(test);
     Assert.That(test.Properties.Get(PropertyNames.SkipReason), Is.EqualTo("BECAUSE"));
 }