r/badcode • • Oct 13 '21

java When all you need is test coverage

Post image
325 Upvotes

25 comments sorted by

View all comments

18

u/trutheality Oct 13 '21

This tests whether from and getValue are inverses of each other. Sure, they should be, but that's the point of testing: checking that things that should be true are in fact, true.

→ More replies (4)