You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2012/03/09 00:09:09 UTC
svn commit: r1298650 -
/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/NysiisTest.java
Author: ggregory
Date: Thu Mar 8 23:09:08 2012
New Revision: 1298650
URL: http://svn.apache.org/viewvc?rev=1298650&view=rev
Log:
Refactor test for less test fixture construction noise.
Modified:
commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/NysiisTest.java
Modified: commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/NysiisTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/NysiisTest.java?rev=1298650&r1=1298649&r2=1298650&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/NysiisTest.java (original)
+++ commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/NysiisTest.java Thu Mar 8 23:09:08 2012
@@ -85,37 +85,32 @@ public class NysiisTest extends StringEn
@Test
public void testDropBy() throws EncoderException {
- List<String[]> testValues =
- Arrays.asList(
- new String[] { "MACINTOSH", "MCANT" },
- new String[] { "KNUTH", "NAT" },
- new String[] { "KOEHN", "CAN" },
- new String[] { "PHILLIPSON", "FALAPSAN" },
- new String[] { "PFEISTER", "FASTAR" },
- new String[] { "MCKEE", "MCY" },
- new String[] { "MACKIE", "MCY" },
- new String[] { "HEITSCHMIDT", "HATSNAD" },
- new String[] { "BART", "BAD" },
- new String[] { "HURD", "HAD" },
- new String[] { "HUNT", "HAD" },
- new String[] { "WESTERLUND", "WASTARLAD" },
- new String[] { "CASSTEVENS", "CASTAFAN" },
- new String[] { "VASQUEZ", "VASG" },
- new String[] { "FRAZIER", "FRASAR" },
- new String[] { "BOWMAN", "BANAN" },
- new String[] { "RICKERT", "RACAD" },
- new String[] { "DEUTSCH", "DAT" },
- new String[] { "WESTPHAL", "WASTFAL" },
- new String[] { "SHRIVER", "SRAVAR" },
- new String[] { "KUHL", "CAL" },
- new String[] { "RAWSON", "RASAN" },
- new String[] { "JILES", "JAL" },
- new String[] { "CARRAWAY", "CARY" },
- new String[] { "YAMADA", "YANAD" });
-
- for (String[] arr : testValues) {
- Assert.assertEquals("Problem with " + arr[0], arr[1], this.fullNysiis.encode(arr[0]));
- }
+ this.assertEncodings(
+ new String[] { "MACINTOSH", "MCANT" },
+ new String[] { "KNUTH", "NAT" },
+ new String[] { "KOEHN", "CAN" },
+ new String[] { "PHILLIPSON", "FALAPSAN" },
+ new String[] { "PFEISTER", "FASTAR" },
+ new String[] { "MCKEE", "MCY" },
+ new String[] { "MACKIE", "MCY" },
+ new String[] { "HEITSCHMIDT", "HATSNAD" },
+ new String[] { "BART", "BAD" },
+ new String[] { "HURD", "HAD" },
+ new String[] { "HUNT", "HAD" },
+ new String[] { "WESTERLUND", "WASTARLAD" },
+ new String[] { "CASSTEVENS", "CASTAFAN" },
+ new String[] { "VASQUEZ", "VASG" },
+ new String[] { "FRAZIER", "FRASAR" },
+ new String[] { "BOWMAN", "BANAN" },
+ new String[] { "RICKERT", "RACAD" },
+ new String[] { "DEUTSCH", "DAT" },
+ new String[] { "WESTPHAL", "WASTFAL" },
+ new String[] { "SHRIVER", "SRAVAR" },
+ new String[] { "KUHL", "CAL" },
+ new String[] { "RAWSON", "RASAN" },
+ new String[] { "JILES", "JAL" },
+ new String[] { "CARRAWAY", "CARY" },
+ new String[] { "YAMADA", "YANAD" });
}
/**