Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

How can I get full coverage on class of static utility methods?

$
0
0

Consider the following minimal class:

 

publicabstractclass UtilityClass {    private UtilityClass() {}    publicstaticvoid utilityMethod() {}}
When I run the tests with coverage, the empty constructor always comes up as not covered:
  • it doesn't matter if I mark the class abstract
  • it doesn't matter if I mark the constructor private or not define it at all

 

Is there a way to get IDEA report 100% coverage of this class (other than the silly solution of testing the empty constructor)?


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>