This post originated from an RSS feed registered with .NET Buzz
by Christian Horsdal.
Original Post: Spec Style Unit Tests in C#
Feed Title: Horsdal
Feed URL: http://www.horsdal-consult.dk/feeds/posts/default
Feed Description: A blog that will be about code, architecture, design, and .NET.
Spec style unit tests are unit tests that focus on making the specs clear, and then relating some test code to each part of the spec. The Specs Scala unit test framework is really good at that (e.g. check this earlier post), but I want to be able to do the same in C#.
Lets look at an example: A method for deciding whether a given year is a leap year. The rules for leap years are:
A leap year