On twitter I read this post:
Since I have a wordpress blog and like a challenge, here is the daily post in my Zero to Hero sequence.
Publish a post that includes a new element
Roy Osherove has written a book called “Art of unit testing”. It’s a good read when starting with unit testing. The website called artofunittesting.com contains even more information.
Below I want to share a basic principle about unit testing I’ve adopted from Roy.
In more detail:
- Readable, make sure the developer that reads the tests after you’ve moved on, knows what you mean,
- Trustworthy, you must be able to rely on the outcome of the tests,
- Fast, since you’ll be writing a lot of tests make sure they don’t take a lot of time to run (think milliseconds),
- Maintainable, use stubs in stead of mocks, write helper methods and other tips to avoid rewriting lots of tests.
The first slide is from a video you can find here.
Pingback: Unittest NServiceBus saga | .NET Development by Eric