How to find regressions
This tutorial demonstrates finding a regression in refactoring quickly and easily, using Spring Petclinic with Diffblue Cover Plugin for IntelliJ.
@Component
public class PetTypeFormatter implements Formatter<PetType> {
@Autowired
private PetRepository pets;
...
@Override
public PetType parse(String text, Locale locale) throws ParseException {
Collection<PetType> findPetTypes = this.pets.findPetTypes();
for (PetType type : findPetTypes) {
if (type.getName().equals(text)) {
return type;
}
}
throw new ParseException("type not found: " + text, 0);
}
}
Last updated
Was this helpful?

