VI. No unit tests
Driving without headlights
In modern day it’s almost unacceptable to deliver code in any form or shape without testing it
. A concept called Test-driven development (TDD) has been born to accommodate the inclusion of tests into requirements and effectively baking these into the process of producing testable code
.
Let’s first look at this code example below, a simple method returns some sort of calculation result – in this instance calculating postage cost.
public class ShoppingCart
{
public double CalculatePostageCost(int zone, double distance)
{
return zone * distance;
}
}
Read more on dirtydozen
Browse to https://qbituniverse.github.io/dirtydozen/no-unit-tests/ to carry on reading about No unit tests
…