nunit/nunit-framework — pull request #207 by rprouse (2014-09-09 02:15:36+00:00)
Title: Issue 54 - Store message and stack trace in `TestContext` (for use in `[TearDown]`)

I added the following read-only properties to `TestContext.CurrentContext.Result` => `Message`, `StackTrace`, `FailCount`, `PassCount`, `SkipCount` and `InconclusiveCount`.

I have unit tests for the passing cases in a `[TearDown]` and in a `[OneTimeTearDown]`.

I have tested `Message`, `StackTrace` and `FailCount` in the debugger, but I can't figure out how to write proper unit tests for them. How do I write fully exercised failing unit tests that pass?

The first half of the TestContext changes are just code style changes. The real changes start at line 341.