Re: Abstract Test Classes

"Charlie Poole" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <00b601c87eee$d0939bf0$6401a8c0@ferrari>
This was a bug fix that came in after 2.2.2. It's an error to put a
TestFixtureAttribute on an abstract
class. Imagine the situation where you created an abstract class but
neglected to derive from it.
It would have been silently ignored.
 
The intent is for TestFixtureAttribute to mean "this is a test, run it." The
way to achieve that 
is to put the attribute on the derived classes, not the abstract class.
 
Charlie


  _____  

From: [email protected]
[mailto:[email protected]] On Behalf Of Jeff
Sent: Wednesday, March 05, 2008 9:41 AM
To: [email protected]
Subject: [Nunit-users] Abstract Test Classes


I just recently upgraded from NUnit 2.2.2 to 2.4.6. 

In one of my test suites, I have an abstract test class that I inherit from
on for other test classes.

In 2.2.2, this test did not show up in the nunit GUI at all.

In 2.4.6, this test is showing up in the GUI and getting the "yellow"
ignored icon when I run the test suite.  And looking at the Tests Not Run,
it says that it didn't run because it's an abstract class (of course).

Do other people have abstract test classes?  What is the recommended
solution here?

Thanks,
Jeff

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.