I think part of the motivation for one assertion per test comes from the fact that you stop getting information from a test as soon as one assertion fails.
I think it was a guidance, like the SRP where you should be testing one thing in each test case. I also think a growing number of assertions might be a sign your unit under test is wearing too many responsibilities.
Maybe it’s better to say “few assertions, all related to testing one thing”
I think it was a guidance, like the SRP where you should be testing one thing in each test case. I also think a growing number of assertions might be a sign your unit under test is wearing too many responsibilities.
Maybe it’s better to say “few assertions, all related to testing one thing”