EMMA reports incorrect stats for the following simple enum:
public enum ProcessState{ACTIVE, COMPLETED, ABANDONED}
EMMA reports 50% method, 81% block, and 81% line
coverage. These should all be 100% since there are no
methods, blocks, or lines defined in this enum.
Logged In: YES
user_id=639492
Originator: NO
+1
There is a workaround though, you can write a unit test to exercise the generated enum methods just to silence EMMA. In theory you could have a single unit test crawl your project, find all enums, load the class and run all methods.
If the language generates code for you, the only valid assumption is that the code generation has been tested already. I understand that the Sun JVM marks all the auto-generated code at line "1" for enums. The correct approach would then be to ignore this autogenerated code.