org.apache.commons.codec.language
Class NysiisTest

java.lang.Object
  extended by org.apache.commons.codec.StringEncoderAbstractTest<Nysiis>
      extended by org.apache.commons.codec.language.NysiisTest

public class NysiisTest
extends StringEncoderAbstractTest<Nysiis>

Tests Nysiis

Since:
1.7
Version:
$Id: NysiisTest.html 889935 2013-12-11 05:05:13Z ggregory $

Field Summary
 
Fields inherited from class org.apache.commons.codec.StringEncoderAbstractTest
stringEncoder
 
Constructor Summary
NysiisTest()
           
 
Method Summary
protected  Nysiis createStringEncoder()
           
 void testBran()
           
 void testCap()
           
 void testDad()
           
 void testDan()
           
 void testDropBy()
          Tests data gathered from around the internet.
 void testFal()
           
 void testOthers()
          Tests data gathered from around the internets.
 void testRule1()
          Tests rule 1: Translate first characters of name: MAC → MCC, KN → N, K → C, PH, PF → FF, SCH → SSS
 void testRule2()
          Tests rule 2: Translate last characters of name: EE → Y, IE → Y, DT, RT, RD, NT, ND → D
 void testRule4Dot1()
          Tests rule 4.1: EV → AF else A, E, I, O, U → A
 void testRule4Dot2()
          Tests rule 4.2: Q → G, Z → S, M → N
 void testRule5()
          Tests rule 5: If last character is S, remove it.
 void testRule6()
          Tests rule 6: If last characters are AY, replace with Y.
 void testRule7()
          Tests rule 7: If last character is A, remove it.
 void testSnad()
           
 void testSnat()
           
 void testSpecialBranches()
           
 void testTranan()
           
 void testTrueVariant()
           
 
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

NysiisTest

public NysiisTest()
Method Detail

createStringEncoder

protected Nysiis createStringEncoder()
Specified by:
createStringEncoder in class StringEncoderAbstractTest<Nysiis>

testBran

public void testBran()

testCap

public void testCap()

testDad

public void testDad()

testDan

public void testDan()

testDropBy

public void testDropBy()
                throws EncoderException
Tests data gathered from around the internet.

Throws:
EncoderException
See Also:
http://www.dropby.com/NYSIISTextStrings.html

testFal

public void testFal()

testOthers

public void testOthers()
                throws EncoderException
Tests data gathered from around the internets.

Throws:
EncoderException

testRule1

public void testRule1()
               throws EncoderException
Tests rule 1: Translate first characters of name: MAC → MCC, KN → N, K → C, PH, PF → FF, SCH → SSS

Throws:
EncoderException

testRule2

public void testRule2()
               throws EncoderException
Tests rule 2: Translate last characters of name: EE → Y, IE → Y, DT, RT, RD, NT, ND → D

Throws:
EncoderException

testRule4Dot1

public void testRule4Dot1()
                   throws EncoderException
Tests rule 4.1: EV → AF else A, E, I, O, U → A

Throws:
EncoderException

testRule4Dot2

public void testRule4Dot2()
                   throws EncoderException
Tests rule 4.2: Q → G, Z → S, M → N

Throws:
EncoderException

testRule5

public void testRule5()
               throws EncoderException
Tests rule 5: If last character is S, remove it.

Throws:
EncoderException

testRule6

public void testRule6()
               throws EncoderException
Tests rule 6: If last characters are AY, replace with Y.

Throws:
EncoderException

testRule7

public void testRule7()
               throws EncoderException
Tests rule 7: If last character is A, remove it.

Throws:
EncoderException

testSnad

public void testSnad()

testSnat

public void testSnat()

testSpecialBranches

public void testSpecialBranches()

testTranan

public void testTranan()

testTrueVariant

public void testTrueVariant()


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