MbUnit - Getting test failure/success result in TestFixtureTearDown -


I am using MbUnit for some integration tests. In TestFixtureSetUp, I create a new instance of a database (using a GUID as the DB name) in tear down, I delete it.

However, if the tests fail, I want to keep the database alive (so I can check it). Tell me from my testfighter, whether the tests have passed or failed?

In the code it will look like this:

  [TestFixtureTearDown] Stop Public Zero () (if (/ * All exams pass / /) {Database.Dispose ();} }  

In MbUnit v3 you use: TestContext.Current.Outcome.Status = = TestStatus.Passed

Please note that MbUnit v3 [TestFixtureSetUp] was renamed [FixtureSetUp].


Comments