New answers tagged


You must embrace all the possible use cases, including "on bound" cases, that is the representative case.There is no a "representative" case, which misses even one possible use case.


For every assertion, ask yourself: does this improve confidence in the code? If two of the assertions test the exact same code and the only difference is what the actual values are in the test then it is very unlikely that both of them add value which the other one doesn't. Some corollaries to that: This is why red/green/refactor TDD can be so powerful: ...

Top 50 recent answers are included