dirtydozen.dev – No unit tests

dirtydozen.dev

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.dev

Browse to https://dirtydozen.dev/no-unit-tests to carry on reading about No unit tests

Marcin Narloch

Marcin Narloch

Creative and out-of-the-box thinker with strong interests and knowledge in technology and innovation.
dirtydozen.dev Previous post dirtydozen.dev – Large method bodies
Reset Git Branch Commits Next post Reset Git Branch Commits

Leave a Reply

Your email address will not be published. Required fields are marked *