2using System.Diagnostics;
 
    4using Microsoft.VisualStudio.TestTools.UnitTesting;
 
   29        public static void Until(DateTime skipExpiry, 
string targetRelease = 
null, 
string ticket = 
null)
 
   32            string estRelease = skipExpiry.ToString(
@"dd/MM/yyyy") +
 
   33                (targetRelease == 
null ? 
"" : $
" ({targetRelease})");
 
   34            if (DateTime.UtcNow < skipExpiry)
 
   36                string reason = $
"Test skipped until {estRelease}.";
 
   38                    reason += $
" See {ticket}";
 
   39                Debug.WriteLine(reason);
 
   40                Assert.Inconclusive(reason);
 
   44                string reason = $
"Skip.Until expired on {estRelease}. " +
 
   45                    "Remove the skip or set a new estimated completion date " +
 
   46                    $
"if {ticket ?? "the resolution
"} has been postponed.";
 
   47                Debug.WriteLine(reason);
 
 
   57            string reason = 
"Test skipped indefinitely.";
 
   59                reason += $
" See {ticket}";
 
   60            Debug.WriteLine(reason);
 
   61            Assert.Inconclusive(reason);
 
 
 
Retrieve settings from environment variables if they exist, or the project settings file otherwise.
 
static bool FAIL_ON_EXPIRED_SKIP
If true, expired SkipUntils will raise an exception saying they are expired. If false,...
 
static bool SKIPS_ENABLED
If true, SkipUntils can be used to skip tests. If false, SkipUntils will be ignored and all tests wil...
 
A helper class containing default skip dates.
 
static void Validation(string ticket=null)
Skip a test due to a validation-related issue, possibly with no insight into when this issue is likel...
 
Class used in unit tests to mark tests as skipped by using Assert.Inconclusive() method.
 
static readonly bool SKIPS_ENABLED
Whether skips are currently configured to be enabled. If disabled, calls to Skip tests do nothing,...
 
static readonly bool FAIL_ON_EXPIRED_SKIP
Whether skips are configured to fail if they are past due. If true, an overdue skip will invokeAssert...
 
static void Until(DateTime skipExpiry, string targetRelease=null, string ticket=null)
Skip the specified test until the specified date, after which this test should be treated as failing ...
 
static void Indefinitely(string ticket=null)
Skip the specified test.