Skip to content

Unit Tests - The Three Laws of Test Driven Development #33

@jnguyen095

Description

@jnguyen095

By now everyone knows that TDD asks us to write unit tests first, before we write production code. But that rule is just the tip of the iceberg. Consider the following three laws:

  1. First Law You may not write production code until you have written a failing unit test.
  2. Second Law You may not write more of a unit test than is sufficient to fail, and not compiling
    is failing.
  3. Third Law You may not write more production code than is sufficient to pass the currently
    failing test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions