Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
beefeater
· 7y ago · 0 comments
If you need to make sure every condition is handled, write a test for every condition.
Comments
[–]
lmm
7y ago
Why? That's both more work and more error-prone than just using a language that will ensure it.
[–]
lgunsch
7y ago
If every condition is important to the business, as is implied in this case, it would be very valuable to have tests to cover them.
[–]
lmm
7y ago
The business wants to know all conditions are handled appropriately, to a certain level of confidence. Tests are one way of achieving this but by no means the only way.