I'm currently doing a whole new project and writing some utilities such as StringUtil.java
.
I have a private constructor like below.
public class StringUtil {
// TODO Exclude this from measuring test coverage
private StringUtil() { }
public static boolean isEqual(String a, String b){
return true;
}
}
After doing Run test... with Coverage
in android studio, I got my coverage which is not 100%. Because the private Constructor is not called.
Is there any workaround to exclude private constructor from measuring test coverage(without calling it, indeed)?