Skip to content

Instantly share code, notes, and snippets.

@grational
Created October 26, 2016 08:26
Show Gist options
  • Save grational/c6c9fc998f5aee283bd7fceb90d91512 to your computer and use it in GitHub Desktop.
Save grational/c6c9fc998f5aee283bd7fceb90d91512 to your computer and use it in GitHub Desktop.
import it.italiaonline.rnd.filters.TextFilter;
/**
* This class includes simple test cases for the AddressSmartCap 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 26/10/16 10.26
*/
public class Launcher {
public static void main(String[] args) {
String[] input = {
"AZALEA S.A.S. DI AZZALE FRANCO E PIETRO & C. A SANTHIA'",
"STUDIO DENTISTICO LEINI' IACONO DOTT.SSA LIVIA",
"NUOVA CARROZZERIA RORA' F.LLI MASCHIO DI MASCHIO MASSIMO & C. SNC"
};
String[] output = {
"Azalea S.a.s. di Azzale Franco e Pietro & C. a Santhià",
"Studio Dentistico Leinì Iacono Dott.ssa Livia",
"Nuova Carrozzeria Rorà F.lli Maschio di Maschio Massimo & C. Snc"
};
for (int i=0; i<input.length; i++) {
assert output[i].equals(
new TextFilter.AddressSmartCap(input[i]).result()
);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment