Re: Abstract Test Classes

Jeff <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <[email protected]>
Charlie,

Thanks, that explains it well - I agree it's a better solution.

Thanks,
Jeff

On Wed, Mar 5, 2008 at 1:29 PM, Charlie Poole <[email protected]>
wrote:

>  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.