Covering NUnit 2.4.7

It's interesting that a flurry of releases of testing frameworks have been released lately with Gallio, xUnit.net and of course NUnit.  Charlie Poole recently announced on a lot of the discussion boards I belong to recently that NUnit 2.4.7 was recently released.  You can read all about what's been added here with the release notes. 

What's New and Interesting?

What's interesting about this release?  Well, NUnit no longer depends on log4net, thus getting rid of some dependency issues with regards to the applications under test.  What's also interesting is that addition of the RowTest extension to allow  multiple sets of arguments to be given to a test.  This is the first one that's ever been incorporated into the core of NUnit.

Static Tests in NUnit?

As Andy Stopford noted in my blog yesterday regarding xUnit.net, Charlie recently checked in code to allow static methods for static methods to be tests as well as Setup and TearDown to be static as well.  Jim Newkirk, the man behind NUnit and co-creator of xUnit.net, favors that approach of allowing statics.  To me, I don't care as much with regards to Startup and TearDown with statics as most of my statics for testing F# is side effect free programming.  As it should be with functional programming.  Anyhow, what I'd like to see in NUnit is the support for something that I can do in xUnit.net:

#light

#R @"D:\Program Files\NUnit 2.4.7\bin\nunit.core.dll"
#R @"D:\Program Files\NUnit 2.4.7\bin\nunit.framework.dll"

open NUnit.Framework

let rec fib n =
  match n with
  | 0 | 1 -> 0
  | n -> fib(n-2) + fib(n-1)
  | n when n < 0 -> failwith "Cannot be less than zero"

[<TestFixture>]
let FibOfOneShouldReturnZero() =
  let fibResult = fib(1)
  Assert.AreEqual(fibResult, 0)


If I saw something like this, I'd be a happy man.  But until then, I can dream...

Conclusion

Go ahead and pick up your copy today of NUnit.  It's been the old standby for many of my projects throughout my career and served me quite well.  Next time I'll cover Gallio a little bit as I have neglected it, but it's a huge release.


kick it on DotNetKicks.com
Published Tuesday, April 01, 2008 5:35 PM by podwysocki
Filed under: , ,

Comments

# Mind Gravy &raquo; Blog Archive &raquo; links for 2008-04-02

Wednesday, April 02, 2008 8:36 AM by Mind Gravy » Blog Archive » links for 2008-04-02

Pingback from  Mind Gravy  &raquo; Blog Archive   &raquo; links for 2008-04-02

# re: Covering NUnit 2.4.7

Wednesday, April 02, 2008 9:23 AM by Nair

Could you be kind enough to elobrate little on the following statement when possible?

"me, I don't care as much with regards to Startup and TearDown with statics as most of my statics for testing F# is side effect free programming." What do you mean by F# is side effect free??

Thanks for all the great blogs.

# re: Covering NUnit 2.4.7

Wednesday, April 02, 2008 6:14 PM by podwysocki

@Nair

What I mean by side effect free programming isn't something exclusive to F# nor functional programming, but it is very prominent in it.  What I mean by "side effect free" is that I don't change the state of my current object, meaning no invariants changed.  An example of this would be writing to a console, hitting a database, or changing a property on my object.  

HTH

Matt

# re: Covering NUnit 2.4.7

Wednesday, April 06, 2011 5:37 AM by weblogs.asp.net

Covering nunit 2 4 7.. Very nice :)

# re: Covering NUnit 2.4.7

Sunday, May 01, 2011 9:05 AM by weblogs.asp.net

Covering nunit 2 4 7.. He-he-he :)

# re: Covering NUnit 2.4.7

Tuesday, June 14, 2011 12:17 PM by weblogs.asp.net

Covering nunit 2 4 7.. Bang-up :)

Leave a Comment

(required) 
(required) 
(optional)
(required)