Stop requiring only one assertion per unit test: Multiple assertions are fine

Argues the case for tests to contain more than one assertion

Assertion Roulette doesn’t mean that multiple assertions are bad.

When I coach teams or individual developers in test-driven development (TDD) or unit testing, I frequently encounter a particular notion: Multiple assertions are bad. A test must have only one assertion.

That idea is rarely helpful.

Let’s examine a realistic code example and subsequently try to understand the origins of the notion.