title: Ignoring (skipping) an NUnit test case without throwing an exception
body: <p>I have a requirement to <strong>not</strong> run a test case during certain times in the month and I would like to ignore or skip the relevant test(s) when applicable. So far the only attribute I have found that makes sense is <code>Assert.Ignore();</code>. Unfortunately triggering this method throws an <code>IgnoreException</code> <s>and as a consequence the NUnit <code>TearDown</code> will not be triggered. This is not ideal as I have code that I would like to execute after each test case <em><strong>irrespective</strong></em> of the test outcome.</s> <em>I was incorrect in my assumption please find comments below...</em></p>
  <p>In an ideal world I wish I could just set the test outcome in my ignore / skipped part of the code, example:</p>
  <pre><code>else
  {
      //it's after the 25th of the month let's skip this test case
      TestContext.CurrentContext.Result.Outcome == ResultState.Ignored;
  }
  </code></pre>
  <p>But I understand that <code>TestContext.CurrentContext.Result.Outcome</code> is only a <code>Get</code> for good reason and it would most likely just open a can of worms with people just setting their tests as passed when they should not etc..</p>
  <pre><code>[Test]
  [TestCase(TestName = &quot;Test A&quot;)]
  [Description(&quot;Test A will be testing something.&quot;)]
  [Category(&quot;Regression Test Pack&quot;)]
  public void Test_Case_1()
  {
      sessionVariables = new Session().SetupSession(uiTestCase: true);
  
      if (DateTime.Now.Day &lt;= 25)
      {
          //let's test something!
      }
      else
      {
          //it's after the 25th of the month let's skip this test case
          Assert.Ignore();
      }
  }
  
  [TearDown]
  public void Cleanup()
  {
      sessionVariables.TeardownLogic(sessionVariables);
  }
  </code></pre>