Skip to content

Instantly share code, notes, and snippets.

Created June 2, 2012 11:07
Show Gist options
  • Save anonymous/2857816 to your computer and use it in GitHub Desktop.
Save anonymous/2857816 to your computer and use it in GitHub Desktop.
Trying to "pass" a test in SetUp and stop it's execution.
//MbUnit / Gallio 3.3.454
[TestFixture]
public class Class1
{
[SetUp]
public void SetUp()
{
Trace.WriteLine("Starting Setup..");
Trace.WriteLine("Forcing Passed..");
throw new SilentTestException(TestOutcome.Passed);
}
[Test]
public void Test()
{
Trace.WriteLine("Running Test()..");
throw new Exception("I shoulnd't be here :(");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment