Plunging into .NET Development

Weblog Pieter Gheysens
Microsoft .NET Development - C# - Enterprise Library - Visual Studio 2005 Team System - Compuware DevPartner - ...
 


Tuesday, September 13

NUnit Test Methods

Did you know?

For backwards compatibility with previous versions of NUnit a test method will also be found if the first 4 letters are "test" regardless of case.
[TestAttribute (NUnit 2.0)]

I found out by accident. In my TestFixture-class I had a private method testDoSomething and I was surprised to see that this method was showing up in the list of test methods.

Result :



Backward compatibility for a private method?

I thought that UnitTests could only be red (failure) or green (success) ...

1 Comments:

  • At 9:56 AM, Anonymous Steven Wilssens said…

    Pieter,

    Since NUnit Iteration Release 2.2.2, the old style test cases ("Test....") are no longer recognized by default. A setting in the test config file may be used to allow their use on an assembly by assembly basis. You can verify this in the release notes for version 2.2.2.

     

Post a Comment

Links to this post:

Create a Link

<< Home