nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #00307
[Bug 523335] [NEW] TestFixtureTearDown in static class not executed
Public bug reported:
Here's an example:
[TestFixture]
public static partial class Tests
{
[TestFixtureSetUp]
public static void Init()
{
Console.WriteLine("INIT");
}
[TestFixtureTearDown]
public static void Cleanup()
{
Console.WriteLine("CLEANUP");
}
}
Init() gets executed but Cleanup() does not.
Could it be that this code, in NUnitCore\core\TestSuite.cs:
protected virtual void DoOneTimeTearDown(TestResult suiteResult)
{
if ( this.Fixture != null)
should actually look like this:
protected virtual void DoOneTimeTearDown(TestResult suiteResult)
{
if ( this.FixtureType != null)
which would make it the same as DoOneTimeSetUp?
** Affects: nunit-3.0
Importance: Undecided
Status: New
--
TestFixtureTearDown in static class not executed
https://bugs.launchpad.net/bugs/523335
You received this bug notification because you are a member of NUnit
Core Developers, which is the registrant for NUnit Framework.
Status in NUnit Test Framework: New
Bug description:
Here's an example:
[TestFixture]
public static partial class Tests
{
[TestFixtureSetUp]
public static void Init()
{
Console.WriteLine("INIT");
}
[TestFixtureTearDown]
public static void Cleanup()
{
Console.WriteLine("CLEANUP");
}
}
Init() gets executed but Cleanup() does not.
Could it be that this code, in NUnitCore\core\TestSuite.cs:
protected virtual void DoOneTimeTearDown(TestResult suiteResult)
{
if ( this.Fixture != null)
should actually look like this:
protected virtual void DoOneTimeTearDown(TestResult suiteResult)
{
if ( this.FixtureType != null)
which would make it the same as DoOneTimeSetUp?
Follow ups
-
[Bug 523335] Re: TestFixtureTearDown in static class not executed
From: Charlie Poole, 2010-07-25
-
[Bug 523335] Re: TestFixtureTearDown in static class not executed
From: Launchpad Bug Tracker, 2010-05-04
-
[Bug 523335] Re: TestFixtureTearDown in static class not executed
From: Charlie Poole, 2010-04-23
-
[Bug 523335] Re: TestFixtureTearDown in static class not executed
From: Launchpad Bug Tracker, 2010-04-19
-
[Bug 523335] Re: TestFixtureTearDown in static class not executed
From: Charlie Poole, 2010-04-18
-
[Bug 523335] Re: TestFixtureTearDown in static class not executed
From: Charlie Poole, 2010-04-18
-
[Bug 523335] Re: TestFixtureTearDown in static class not executed
From: Charlie Poole, 2010-04-17
-
[Bug 523335] Re: TestFixtureTearDown in static class not executed
From: Charlie Poole, 2010-04-17
-
[Bug 523335] Re: TestFixtureTearDown in static class not executed
From: Charlie Poole, 2010-02-17
-
[Bug 523335] [NEW] TestFixtureTearDown in static class not executed
From: rstarkov, 2010-02-17
References