As I use it, it focuses on unit testing. Suppose I want a method that has square ints, I write this method:
int square(int x) { return null; }
and then write some tests like:
[Test] TestSquare() { Assert.AreEqual(square(0),0); Assert.AreEqual(square(1),1); Assert.AreEqual(square(10),100); Assert.AreEqual(square(-1),1); Assert.AreEqual(square(-10),100); .... }
Well, maybe a square is a bad example :-)
In each case, I check the expected behavior and all the boundary shafts, such as maxint and zero and zero value (remember that you can also check for errors) and see that the test fails (which is not difficult :-)), then I continue work on a function until it works.
So: first a unit test, which does not allow you to cover what you want to cover it, then a method.
Peter source share