Hacker News new | ask | show | jobs
by bethly 2803 days ago
This only comes up if you have data that isn't bundled with logic: as long as there is some logic to test, even enums end up with full coverage.

The outstanding issue with Java code coverage tools is switch statements, because there are unhandled paths generated by the compiler, but there is an easy solution: don't use switch statements. Enums are basically always a better option anyway.