Freigeben über


Another set of evolving tests

Yesterday I stumbled across this example of how unit tests can be rewritten in different ways. The only thing I'm missing in the final version is reporting the values in the checkOneValue and stackSizeShouldBe methods. I'm assuming the report method is used to print a nice report so that the test output basically becomes your story scenarios. That is, the strings are not just another way of making the test readable the output is also usable as a specification of what the code does.

But anyway. It's nice to see I'm not the only one doing this...