/ blog

# Testing

Write tests early, and choose a strategy that encourages consumable code:

# Test driven development

# Outside in

Acceptance tests drive integration tests that drive unit tests

# Inside out

Unit tested lego bricks assembled into integration tested layers fashioned into acceptance tests

# Red green refactor

Write a test and see it fail, write enough code to get it passing, and refactor the code towards some existing or new design pattern to make it extensible.

Read books on refactoring and see as many examples as possible.

# Test Doubles

# Inversion of Control (IoC)

Give the caller the power to control the behavior of your class.

Get handed classes via a method call rather than newing up classes in your method call.