Home | Articles | Images | Links | Contact Me | Login Archive | RSS Feed | ATOM Feed

Calendar

JulAugust 2008Sep
SMTWTFS
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456

Suggested Reading

Blog Stats

Posts - 1321
Stories - 6
Comments - 2155
Trackbacks - 473

Logos and Stuff

Disclaimer

The content of this site is my own personal opinion and does not in any way represent my employer, it's subsideries or affiliates. These postings are provided "AS IS" with no warranties, and confer no rights.
Replacing ExpectedException in NUnit 2.4

Jim Newkirk, Brad Wilson and I have been in agreement about the evils of ExpectedException for a long time. When Jim and Brad wrote xUnit.net, in fact, they left it out and opted instead for a new Throws method that lets you be a lot more precise about what and when you are testing the exception.

But NUnit 2.4.x doesn't have this feature (2.5 will). Fear not! Jim has written a nice little sample of the Throws method for NUnit 2.4.x that provides this same experience in his new post Replacing ExpectedException in NUnit.

If you are using NUnit today, I would really suggest you read the post and consider changing the way you test exceptions in your unit tests.

posted on Friday, June 27, 2008 12:14 PM
Rating:

Search

Supported By


Current Promotion
ThinkGeek

Hosted By