← Back to team overview

nunit-core team mailing list archive

[Bug 591265] Re: Assert.Inconclusive in ctor reported as failure

 

By design, NUnit treats any exception in the constructor - including
NUnit's own exceptions - as an error. You should use SetUp or
TestFixtureSetUp for any code that can cause an error.

Note that we have always recommended as a best practice that
constructors of test classes should not perform any significant
operations. This is because the constructor may be called at times when
you don't expect it to be called - for example when generating data for
parameterized test cases or theories.

Charlie

** Changed in: nunitv2
       Status: New => Invalid

-- 
Assert.Inconclusive in ctor reported as failure
https://bugs.launchpad.net/bugs/591265
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.

Status in NUnit V2 Test Framework: Invalid

Bug description:
The constructor of my TestFixture class calls Assert.Inconclusive.
In the GUI runner, the relevant tests are reported as "failed" (with an "InconclusiveException"), instead of as "inconclusive". They get a red "X" icon, and not a purple "?" icon.

NUnit 2.5.5.10112





References