vendredi 18 mai 2018

List of hard coded string/enum used in Java package or source folder

In our code we have a java file that have all the string constants defined to avoid string duplication. Is it possible to write a test to verify if there is any duplicate string, for eg test that get all the hardcoded strings defined in the java files(Certain packages or source folder) compared against the defined constants. I'm not sure how can I get the list of Strings or is there some clever way to verify this to check any human error?

Aucun commentaire:

Enregistrer un commentaire