Created
June 27, 2016 09:23
-
-
Save grational/7b98ab22b16f3517251030895635280a to your computer and use it in GitHub Desktop.
This class is just a simple test cases for the SmartCap filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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