nunit-2.6.2

NUnit 2.6.2 TestContext.CurrentContext always null

喜你入骨 提交于 2019-12-11 11:47:58
问题 I'm trying to use the TestContext.CurrentContext of NUnit 2.6.2 but it's always null. What I would like is to have an output with the result of tests, but if I run the following code I always get a NullReferenceException in the TearDown method. All the properties inside Test and Result are throwing the exception. [TestFixture] public class UtilitiesTests { [TearDown] public void TearDown() { //using console here just for sake of simplicity. Console.WriteLine(String.Format("{0}: {1}",