In IntelliJ IDEA 15.0.2 how can I ignore trivial getters and setters (trivial methods) during test coverage measurement?
// should be measure
public void complex() {
fancy();
interesting();
dropDatabase();
}
// should not be measured
public int getNumber() {
return this.number;
}
Measuring every line would result in 75%. Measuring only the above method would result in 100%. And those are 100% of the code useful for testing.
How come I don't find anything about that on the Internet? Am I diving into bad practice?
UPDATE
This code is also eligible for testing:
// should also be tested as it contains logic
public Integer getValidationProgress() {
if (validationProgress == null) {
validationProgress = 0;
}
return validationProgress;
}