So for this year's Advent calendar I'll focus on a made up file utility object. The object is called FileUtil and it implements an interface called IFileUtil which looks like this:
public interface IFileUtil { void Create(string content); void Delete(); string Read(); string Path { get; } bool Readable { get; set; } }
The test I will write (in 24 different ways) is a test where I want to verify that the correct exception is thrown when I try to read a file that is not readable. And before I do that I want to make sure the file actually exists and is readable. So basically the test consist of the following steps:
PingBack from http://blog.cwa.me.uk/2008/12/01/the-morning-brew-234/
For easier reference, here are the 2008 advent calendar links: Why and advent calendar? What problem?