Skip to content

Instantly share code, notes, and snippets.

@grational
Created June 27, 2016 09:23
Show Gist options
  • Save grational/7b98ab22b16f3517251030895635280a to your computer and use it in GitHub Desktop.
Save grational/7b98ab22b16f3517251030895635280a to your computer and use it in GitHub Desktop.
This class is just a simple test cases for the SmartCap filter
import it.italiaonline.rnd.filters.TextFilter;
/**
* This class includes simple test cases for the SmartCap filter
* <p>
* A couple of arrays are defined with input / expected_output and a for loop
* to couple them checking against the SmartCap filter.
* @author Giuseppe Ricupero
* @date 27/06/16 09.12
*/
public class Launcher {
public static void main(String[] args) {
String[] input = {
"AZALEA S.A.S. DI AZZALE FRANCO E PIETRO & C.",
"STUDIO DENTISTICO IACONO DOTT.SSA LIVIA",
"NUOVA CARROZZERIA F.LLI MASCHIO DI MASCHIO MASSIMO & C. SNC"
};
String[] output = {
"Azalea S.a.s. di Azzale Franco e Pietro & C.",
"Studio Dentistico Iacono Dott.ssa Livia",
"Nuova Carrozzeria F.lli Maschio di Maschio Massimo & C. Snc"
};
for (int i=0; i<input.length; i++) {
assert output[i].equals(
new TextFilter.SmartCap(input[i]).result()
);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment