Line Monitor Unit Tests

We now turn to developing, TDD style, our LineMonitor library.

Developing Test Driven style means we add behaviours one by one, for each behaviour we go through the RED-GREEN-REFACTOR loop:

  1. RED: write a properly failing test

  2. GREEN: write code that passes the test - the code doesn’t have to be pretty

  3. REFACTOR: tidy up the code to make it readable

Sometimes the REFACTOR step is not needed, but we should always at least consider it.

Let’s go.