commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1298645 - /commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/NysiisTest.java
Date Thu, 08 Mar 2012 23:01:15 GMT
Author: ggregory
Date: Thu Mar  8 23:01:15 2012
New Revision: 1298645

URL: http://svn.apache.org/viewvc?rev=1298645&view=rev
Log:
Tests rule 4.2: Q → G, Z → S, M → N

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=1298645&r1=1298644&r2=1298645&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:01:15 2012
@@ -294,6 +294,23 @@ public class NysiisTest extends StringEn
     }
 
     /**
+     * Tests rule 4.2: Q → G, Z → S, M → N
+     * 
+     * @throws EncoderException
+     */
+    @Test
+    public void testRule4Dot2() throws EncoderException {
+        List<String[]> testValues =
+                Arrays.asList(
+                        new String[] { "XQ", "XG" },
+                        new String[] { "XZ", "X" },
+                        new String[] { "XM", "XN" });
+        for (String[] arr : testValues) {
+            Assert.assertEquals("Problem with " + arr[0], arr[1], this.fullNysiis.encode(arr[0]));
+        }
+    }
+
+    /**
      * Tests rule 5: If last character is S, remove it.
      * 
      * @throws EncoderException



Mime
View raw message