Monday, August 06, 2007

Unit Test - Piece of Logic Covered or Not?

Emma coverage report will show uncovered pieces of logic red. For example,
if (validField(fk.getName(), valueFK)) {
criteria.add(buildRestriction(propertyTypes[i], value, relationName));
criteriaCount.add(buildRestriction(propertyTypes[i], value, relationName));
}
In the unit test, you will need to make the validField returns true. And then the report will show them covered and mark them green.

No comments: