Пример #1
0
 public void ApplyToTest(Test test)
 {
     if (AppveyorHelper.IsRunning())
     {
         Ignore.ApplyToTest(test);
     }
 }
        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 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 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));
        }
Пример #6
0
        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"));
        }
Пример #7
0
        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"));
        }