commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1298650 - /commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/NysiisTest.java
Date Thu, 08 Mar 2012 23:09:09 GMT
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" });
     }
 
     /**



Mime
View raw message