When testing class with only static members report
shows that "<init>()" method is not tested.
Steps to reproduce:
1) Create class with a static method.
2) Create test with that method
3) Run coverage report for this test
What should happen:
Report shows 100% coverage because all the class
members are tested.
What really happens:
Report shows less than 100% coverage, indicates that
method "<init>()" is not tested. Creating an instance
of class during testing brings coverage to 100%.
Additional information:
I understand that "<init>()" method corresponds to the
default constructor created automatically and coverage
report does not distinguish it from other methods and
constructors. From requirements perspective user would
expect to get coverage report only for methods he
wrote, not methods created automatically.
Logged In: YES
user_id=998964
I would like to add that this problem is also present with
all "synthetic" methods (like class(String, boolean). For
method/branch coverage it also is a problem for empty
methods (like empty <init>() in interfaces).
Logged In: YES
user_id=998964
I would like to add that this problem is also present with
all "synthetic" methods (like class(String, boolean). For
method/branch coverage it also is a problem for empty
methods (like empty <init>() in interfaces).