Re: Latest NUnit not running superclass setup/teardown in 2.4.7?
Ron Grabowski <[email protected]> Thu, 3 Jul 2008 13:26:35 -0700 (PDT)
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <[email protected]> |
I've been using this pattern for several version of NUnit. I could never get it work your way:
class BaseClass {
[TestSetUp]
public void TestSetUp() {
// set-up code
PostTestSetUp();
}
protected virtual void PostTestSetUp() {
// empty
}
}
class BaseSubClass : BaseClass {
}
[TestFixture]
class MyTestCase : BaseSubClass {
override protected void PostTestSetUp() {
// additional TestSetUp code goes here...
}
}
----- Original Message ----
From: Doug Mayer <[email protected]>
To: [email protected]
Sent: Thursday, July 3, 2008 3:55:30 PM
Subject: [Nunit-users] Latest NUnit not running superclass setup/teardown in 2.4.7?
I'm having trouble getting something like this to work with NUnit
2.4.7, but it works fine in 2.4.6:
class BaseClass {
// fixture and test set-up and tear-down
}
class BaseSubClass : BaseClass {
}
[TestFixture]
class MyTestCase : BaseSubClass {
}
The tests in MyTestCase won't do any of the setup/teardown (both
fixture and per-test) defined in the BaseClass. Is this a bug or an
intended breaking change? Has anyone else seen this?
Thanks!
Doug
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08