Comment 1 for bug 1047272

Revision history for this message
Charlie Poole (charlie.poole) wrote : Re: [Bug 1047272] [NEW] TestContext.CurrentContext.Result throws NullReferenceException

This is working in 2.6 and 2.6.1 as far as I can tell. The NUnit tests
contain exactly
this scenario in TestContextTests.TestCanAccessTestState_IgnoredInSetUp()

I suggest you run the NUnit tests to verify that this test passes in
your system.
If it fails, then we have a bug depending on your particular platform. If it
passes, then the problem may reside in some specific combination of features
you are using or in your test itself.

In either case, please add a simple test case to reproduce this bug and include
info about your environment.

Charlie

On Fri, Sep 7, 2012 at 3:26 AM, Pavel Spacil
<email address hidden> wrote:
> Public bug reported:
>
> We are using stable NUnit 2.6 for testing using C# .Net code mainly due to new /runlist command line option.
> Before each test in method with TestFixtureSetUp attribute we check if the test shouldn't be skipped. If so Assert.Ignore is called.
> Later in method with TestFixtureTearDown attribute we are used to check TestContext.CurrentContext.Result for actual test result and report it. In version 2.5.8 it worked correctly and Status in Result was properly set. Since 2.6.0 it throws NullReferenceException. Is it something planned and we should call Assert.Ignore or check for the Result somewhere else? Thanks
>
> ** Affects: nunitv2
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to NUnit
> Extended Testing Platform.
> https://bugs.launchpad.net/bugs/1047272
>
> Title:
> TestContext.CurrentContext.Result throws NullReferenceException
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nunitv2/+bug/1047272/+subscriptions