dirtydozen – No unit tests

dirtydozen

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…

Marcin Narloch

Marcin Narloch

Creative and pragmatic technology architect and game developer with decades of experience across enterprise cloud architecture, software engineering, innovation and digital transformation.
dirtydozen Previous post dirtydozen – Large method bodies
Reset Git Branch Commits Next post Reset Git Branch Commits