TestContext.CurrentContext.Result throws NullReferenceException
Bug #1047272 reported by
Pavel Spacil
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NUnit V2 |
Fix Released
|
Wishlist
|
Charlie Poole |
Bug Description
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.
Related branches
Changed in nunitv2: | |
assignee: | nobody → Charlie Poole (charlie.poole) |
milestone: | none → 2.6.2 |
status: | Triaged → Fix Committed |
Changed in nunitv2: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This is working in 2.6 and 2.6.1 as far as I can tell. The NUnit tests s.TestCanAccess TestState_ IgnoredInSetUp( )
contain exactly
this scenario in TestContextTest
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 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 NullReferenceEx ception. Is it something planned and we should call Assert.Ignore or check for the Result somewhere else? Thanks /bugs.launchpad .net/bugs/ 1047272 CurrentContext. Result throws NullReferenceEx ception /bugs.launchpad .net/nunitv2/ +bug/1047272/ +subscriptions
<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.
>
> ** Affects: nunitv2
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to NUnit
> Extended Testing Platform.
> https:/
>
> Title:
> TestContext.
>
> To manage notifications about this bug go to:
> https:/