Introduction

This policy requires you to |Invert The
Pyramid
. In order to do that is extremely likely that you will have to change your code to make it more testable. This is desirable, and is in fact the primary purpose that we do Test Driven Development (TDD). The end result of code that is heavily refactored using the ‘boy scout rule’, and is heavily unit tested is that the code is more decoupled, and much more maintainable.

It is accepted that this is harder than ‘just writing the code’.

Definitions

How to write tests

This is covered in Working practices: how you should undertake your work.

Examples