File tree Expand file tree Collapse file tree
java/org/apache/commons/codec/language
test/org/apache/commons/codec/language Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 */
3131public class RefinedSoundex implements StringEncoder {
3232
33- /**
34- * This static variable contains an instance of the RefinedSoundex using
35- * the US_ENGLISH mapping.
36- */
37- public static final RefinedSoundex US_ENGLISH = new RefinedSoundex ();
38-
39- /**
33+ /**
4034 * RefinedSoundex is *refined* for a number of reasons one being that the
4135 * mappings have been altered. This implementation contains default
4236 * mappings for US English.
@@ -51,6 +45,12 @@ public class RefinedSoundex implements StringEncoder {
5145 private final char [] soundexMapping ;
5246
5347 /**
48+ * This static variable contains an instance of the RefinedSoundex using
49+ * the US_ENGLISH mapping.
50+ */
51+ public static final RefinedSoundex US_ENGLISH = new RefinedSoundex ();
52+
53+ /**
5454 * Creates an instance of the RefinedSoundex object using the default US
5555 * English mapping.
5656 */
Original file line number Diff line number Diff line change @@ -104,10 +104,13 @@ public void testEncode() {
104104 assertEquals ("T60" , this .getEncoder ().encode ("the" ));
105105 assertEquals ("L7050" , this .getEncoder ().encode ("lazy" ));
106106 assertEquals ("D6043" , this .getEncoder ().encode ("dogs" ));
107+
108+ // Testing CODEC-56
109+ assertEquals ("D6043" , RefinedSoundex .US_ENGLISH .encode ("dogs" ));
107110 }
108111
109112 public void testGetMappingCodeNonLetter () {
110113 char code = this .getEncoder ().getMappingCode ('#' );
111114 assertEquals ("Code does not equals zero" , 0 , code );
112115 }
113- }
116+ }
You can’t perform that action at this time.
0 commit comments