Tag Archives: NUnit

Verifying exceptions using IExpectException

The unit tests for NUnit contain an interesting pattern for verifying exception details. The abstract class MessageChecker in assembly nunit.framework.tests implements IExpectException, an interface introduced with NUnit 2.4. Test cases in derived test fixtures set the protected field expectedMessage to the expected exception message which can span several lines or include data from the test [...]

Posted in .NET Development, TDD | Also tagged | Leave a comment

RowTests with NUnit 2.4

I had some time last week and therefore I played around with the new extensibility features of NUnit 2.4. I wanted to know, how difficult it is to implement the RowTest feature of MbUnit as NUnit Addin. Two hours later the RowTest Extension for NUnit was ready. I released the extension under the MIT license.
The [...]

Posted in .NET Development, TDD | Also tagged , , | 29 Comments

Decorate Your Tests

In my last post I showed you how to write a minimal NUnit addin. It didn’t do anything useful, so let’s see what we can do with test decorators.
What Is a Test Decorator?
The Decorator Pattern describes a design for attaching additional responsibilities to an object dynamically. It is also known as Wrapper. Test Decorators wrap [...]

Posted in .NET Development, TDD | Also tagged , | Leave a comment

How To Build an NUnit Addin

Since version 2.2.x of NUnit it was possible to build your own core extensions, but this feature was experimental. With the latest release Addins are officially supported. Core extensions can customize NUnit’s internal behavior such as the creation of tests and their execution.

Technorati Tags NUnit, nunitaddin, unit-testing

Posted in .NET Development, TDD | Also tagged , | 3 Comments

New Version of NUnit

Charlie Poole released NUnit 2.4.1 yesterday. It just fixes some issues and has some minor improvements.
I plan to examine the new extensibility features of NUnit 2.4. So expect some posts about it during the next weeks.

Technorati Tags NUnit, unit-testing

Posted in .NET Development, TDD | Also tagged | Leave a comment