org.apache.commons.codec.language
Class SoundexTest

java.lang.Object
  extended by org.apache.commons.codec.StringEncoderAbstractTest
      extended by org.apache.commons.codec.language.SoundexTest

public class SoundexTest
extends StringEncoderAbstractTest

Tests Soundex.

Keep this file in UTF-8 encoding for proper Javadoc processing.

Version:
$Id: SoundexTest.html 889935 2013-12-11 05:05:13Z ggregory $

Field Summary
 
Fields inherited from class org.apache.commons.codec.StringEncoderAbstractTest
stringEncoder
 
Constructor Summary
SoundexTest()
           
 
Method Summary
protected  org.apache.commons.codec.StringEncoder createStringEncoder()
           
 org.apache.commons.codec.language.Soundex getSoundexEncoder()
           
 void testB650()
           
 void testBadCharacters()
           
 void testDifference()
           
 void testEncodeBasic()
           
 void testEncodeBatch2()
          Examples from http://www.bradandkathy.com/genealogy/overviewofsoundex.html
 void testEncodeBatch3()
          Examples from http://www.archives.gov/research_room/genealogy/census/soundex.html
 void testEncodeBatch4()
          Examples from: http://www.myatt.demon.co.uk/sxalg.htm
 void testEncodeIgnoreApostrophes()
           
 void testEncodeIgnoreHyphens()
          Test data from http://www.myatt.demon.co.uk/sxalg.htm
 void testEncodeIgnoreTrimmable()
           
 void testHWRuleEx1()
          Consonants from the same code group separated by W or H are treated as one.
 void testHWRuleEx2()
          Consonants from the same code group separated by W or H are treated as one.
 void testHWRuleEx3()
          Consonants from the same code group separated by W or H are treated as one.
 void testMsSqlServer1()
          Examples for MS SQLServer from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_setu-sus_3o6w.asp
 void testMsSqlServer2()
          Examples for MS SQLServer from http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support /kb/articles/Q100/3/65.asp&NoWebContent=1
 void testMsSqlServer3()
          Examples for MS SQLServer from http://databases.about.com/library/weekly/aa042901a.htm
 void testNewInstance()
          https://issues.apache.org/jira/browse/CODEC-54 https://issues.apache.org/jira/browse/CODEC-56
 void testNewInstance2()
           
 void testNewInstance3()
           
 void testSoundexUtilsConstructable()
           
 void testSoundexUtilsNullBehaviour()
           
 void testUsEnglishStatic()
          https://issues.apache.org/jira/browse/CODEC-54 https://issues.apache.org/jira/browse/CODEC-56
 void testUsMappingEWithAcute()
          Fancy characters are not mapped by the default US mapping.
 void testUsMappingOWithDiaeresis()
          Fancy characters are not mapped by the default US mapping.
 
Methods inherited from class org.apache.commons.codec.StringEncoderAbstractTest
checkEncoding, checkEncodings, checkEncodingVariations, getStringEncoder, testEncodeEmpty, testEncodeNull, testEncodeWithInvalidObject, testLocaleIndependence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoundexTest

public SoundexTest()
Method Detail

createStringEncoder

protected org.apache.commons.codec.StringEncoder createStringEncoder()
Specified by:
createStringEncoder in class StringEncoderAbstractTest

getSoundexEncoder

public org.apache.commons.codec.language.Soundex getSoundexEncoder()
Returns:
Returns the encoder.

testB650

public void testB650()
              throws org.apache.commons.codec.EncoderException
Throws:
org.apache.commons.codec.EncoderException

testBadCharacters

public void testBadCharacters()

testDifference

public void testDifference()
                    throws org.apache.commons.codec.EncoderException
Throws:
org.apache.commons.codec.EncoderException

testEncodeBasic

public void testEncodeBasic()

testEncodeBatch2

public void testEncodeBatch2()
Examples from http://www.bradandkathy.com/genealogy/overviewofsoundex.html


testEncodeBatch3

public void testEncodeBatch3()
Examples from http://www.archives.gov/research_room/genealogy/census/soundex.html


testEncodeBatch4

public void testEncodeBatch4()
Examples from: http://www.myatt.demon.co.uk/sxalg.htm


testEncodeIgnoreApostrophes

public void testEncodeIgnoreApostrophes()
                                 throws org.apache.commons.codec.EncoderException
Throws:
org.apache.commons.codec.EncoderException

testEncodeIgnoreHyphens

public void testEncodeIgnoreHyphens()
                             throws org.apache.commons.codec.EncoderException
Test data from http://www.myatt.demon.co.uk/sxalg.htm

Throws:
org.apache.commons.codec.EncoderException

testEncodeIgnoreTrimmable

public void testEncodeIgnoreTrimmable()

testHWRuleEx1

public void testHWRuleEx1()
Consonants from the same code group separated by W or H are treated as one.


testHWRuleEx2

public void testHWRuleEx2()
Consonants from the same code group separated by W or H are treated as one. Test data from http://www.myatt.demon.co.uk/sxalg.htm


testHWRuleEx3

public void testHWRuleEx3()
                   throws org.apache.commons.codec.EncoderException
Consonants from the same code group separated by W or H are treated as one.

Throws:
org.apache.commons.codec.EncoderException

testMsSqlServer1

public void testMsSqlServer1()
Examples for MS SQLServer from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_setu-sus_3o6w.asp


testMsSqlServer2

public void testMsSqlServer2()
                      throws org.apache.commons.codec.EncoderException
Examples for MS SQLServer from http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support /kb/articles/Q100/3/65.asp&NoWebContent=1

Throws:
org.apache.commons.codec.EncoderException

testMsSqlServer3

public void testMsSqlServer3()
Examples for MS SQLServer from http://databases.about.com/library/weekly/aa042901a.htm


testNewInstance

public void testNewInstance()
https://issues.apache.org/jira/browse/CODEC-54 https://issues.apache.org/jira/browse/CODEC-56


testNewInstance2

public void testNewInstance2()

testNewInstance3

public void testNewInstance3()

testSoundexUtilsConstructable

public void testSoundexUtilsConstructable()

testSoundexUtilsNullBehaviour

public void testSoundexUtilsNullBehaviour()

testUsEnglishStatic

public void testUsEnglishStatic()
https://issues.apache.org/jira/browse/CODEC-54 https://issues.apache.org/jira/browse/CODEC-56


testUsMappingEWithAcute

public void testUsMappingEWithAcute()
Fancy characters are not mapped by the default US mapping. http://issues.apache.org/bugzilla/show_bug.cgi?id=29080


testUsMappingOWithDiaeresis

public void testUsMappingOWithDiaeresis()
Fancy characters are not mapped by the default US mapping. http://issues.apache.org/bugzilla/show_bug.cgi?id=29080



Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.