org.apache.commons.codec.language
Class MatchRatingApproachEncoderTest

java.lang.Object
  extended by org.apache.commons.codec.StringEncoderAbstractTest<MatchRatingApproachEncoder>
      extended by org.apache.commons.codec.language.MatchRatingApproachEncoderTest

public class MatchRatingApproachEncoderTest
extends StringEncoderAbstractTest<MatchRatingApproachEncoder>

Series of tests for the Match Rating Approach algorithm. General naming nomenclature for the test is of the form: GeneralMetadataOnTheTestArea_ActualTestValues_ExpectedResult An unusual value is indicated by the term "corner case"


Field Summary
 
Fields inherited from class org.apache.commons.codec.StringEncoderAbstractTest
stringEncoder
 
Constructor Summary
MatchRatingApproachEncoderTest()
           
 
Method Summary
protected  MatchRatingApproachEncoder createStringEncoder()
           
 void testAccentRemoval_AllLower_SuccessfullyRemoved()
           
 void testAccentRemoval_ComprehensiveAccentMix_AllSuccessfullyRemoved()
           
 void testAccentRemoval_GerSpanFrenMix_SuccessfullyRemoved()
           
 void testAccentRemoval_MixedWithUnusualChars_SuccessfullyRemovedAndUnusualcharactersInvariant()
           
 void testAccentRemoval_NINO_NoChange()
           
 void testAccentRemoval_NullValue_ReturnNullSuccessfully()
           
 void testAccentRemoval_UpperandLower_SuccessfullyRemovedAndCaseInvariant()
           
 void testAccentRemoval_WithSpaces_SuccessfullyRemovedAndSpacesInvariant()
           
 void testAccentRemovalNormalString_NoChange()
           
 void testcleanName_SuccessfullyClean()
           
 void testCompare_BRIAN_BRYAN_SuccessfullyMatched()
           
 void testCompare_BURNS_BOURNE_SuccessfullyMatched()
           
 void testCompare_CATHERINE_KATHRYN_SuccessfullyMatched()
           
 void testCompare_COLM_COLIN_WithAccentsAndSymbolsAndSpaces_SuccessfullyMatched()
           
 void testCompare_Forenames_SEAN_JOHN_MatchExpected()
           
 void testCompare_Forenames_SEAN_PETE_NoMatchExpected()
           
 void testCompare_Forenames_UNA_OONAGH_ShouldSuccessfullyMatchButDoesNot()
           
 void testCompare_FRANCISZEK_FRANCES_SuccessfullyMatched()
           
 void testCompare_KARL_ALESSANDRO_DoesNotMatch()
           
 void testCompare_LongSurnames_MORIARTY_OMUIRCHEARTAIGH_DoesNotSuccessfulMatch()
           
 void testCompare_LongSurnames_OMUIRCHEARTAIGH_OMIREADHAIGH_SuccessfulMatch()
           
 void testCompare_MCGOWAN_MCGEOGHEGAN_SuccessfullyMatched()
           
 void testCompare_MICKY_MICHAEL_SuccessfullyMatched()
           
 void testCompare_OONA_OONAGH_SuccessfullyMatched()
           
 void testCompare_PETERSON_PETERS_SuccessfullyMatched()
           
 void testCompare_SAM_SAMUEL_SuccessfullyMatched()
           
 void testCompare_SEAN_SHAUN_SuccessfullyMatched()
           
 void testCompare_ShortNames_AL_ED_WorksButNoMatch()
           
 void testCompare_SmallInput_CARK_Kl_SuccessfullyMatched()
           
 void testCompare_SMITH_SMYTH_SuccessfullyMatched()
           
 void testCompare_SOPHIE_SOFIA_SuccessfullyMatched()
           
 void testCompare_STEPHEN_STEFAN_SuccessfullyMatched()
           
 void testCompare_STEPHEN_STEVEN_SuccessfullyMatched()
           
 void testCompare_STEVEN_STEFAN_SuccessfullyMatched()
           
 void testCompare_Surname_AUERBACH_UHRBACH_SuccessfullyMatched()
           
 void testCompare_Surname_COOPERFLYNN_SUPERLYN_SuccessfullyMatched()
           
 void testCompare_Surname_HAILEY_HALLEY_SuccessfullyMatched()
           
 void testCompare_Surname_LEWINSKY_LEVINSKI_SuccessfullyMatched()
           
 void testCompare_Surname_LIPSHITZ_LIPPSZYC_SuccessfullyMatched()
           
 void testCompare_Surname_MOSKOWITZ_MOSKOVITZ_SuccessfullyMatched()
           
 void testCompare_Surname_OSULLIVAN_OSUILLEABHAIN_SuccessfulMatch()
           
 void testCompare_Surname_PRZEMYSL_PSHEMESHIL_SuccessfullyMatched()
           
 void testCompare_Surname_ROSOCHOWACIEC_ROSOKHOVATSETS_SuccessfullyMatched()
           
 void testCompare_Surname_SZLAMAWICZ_SHLAMOVITZ_SuccessfullyMatched()
           
 void testCompare_SurnameCornerCase_Nulls_NoMatch()
           
 void testCompare_Surnames_MURPHY_LYNCH_NoMatchExpected()
           
 void testCompare_SurnamesCornerCase_MURPHY_NoSpace_NoMatch()
           
 void testCompare_SurnamesCornerCase_MURPHY_Space_NoMatch()
           
 void testCompare_TOMASZ_TOM_SuccessfullyMatched()
           
 void testCompare_ZACH_ZAKARIA_SuccessfullyMatched()
           
 void testCompareNameNullSpace_ReturnsFalseSuccessfully()
           
 void testCompareNameSameNames_ReturnsFalseSuccessfully()
           
 void testCompareNameToSingleLetter_KARL_C_DoesNotMatch()
           
 void testGetEncoding_HARPER_HRPR()
           
 void testGetEncoding_NoSpace_to_Nothing()
           
 void testGetEncoding_Null_to_Nothing()
           
 void testGetEncoding_One_Letter_to_Nothing()
           
 void testGetEncoding_SMITH_to_SMTH()
           
 void testGetEncoding_SMYTH_to_SMYTH()
           
 void testGetEncoding_Space_to_Nothing()
           
 void testGetFirstLast3__ALEXANDER_Returns_Aleder()
           
 void testGetFirstLast3_PETE_Returns_PETE()
           
 void testGetMinRating_1_Returns5_Successfully()
           
 void testgetMinRating_10_Returns3_Successfully()
           
 void testgetMinRating_11_Returns_3_Successfully()
           
 void testGetMinRating_13_Returns_1_Successfully()
           
 void testGetMinRating_2_Returns5_Successfully()
           
 void testgetMinRating_5_Returns4_Successfully()
           
 void testgetMinRating_5_Returns4_Successfully2()
           
 void testgetMinRating_6_Returns4_Successfully()
           
 void testGetMinRating_7_Return4_Successfully()
           
 void testgetMinRating_7_Returns4_Successfully()
           
 void testgetMinRating_8_Returns3_Successfully()
           
 void testisEncodeEquals_CornerCase_FirstNameJust1Letter_ReturnsFalse()
           
 void testisEncodeEquals_CornerCase_FirstNameJustSpace_ReturnsFalse()
           
 void testisEncodeEquals_CornerCase_FirstNameNothing_ReturnsFalse()
           
 void testisEncodeEquals_CornerCase_FirstNameNull_ReturnsFalse()
           
 void testisEncodeEquals_CornerCase_SecondNameJustSpace_ReturnsFalse()
           
 void testisEncodeEquals_CornerCase_SecondNameNothing_ReturnsFalse()
           
 void testisEncodeEquals_CornerCase_SecondNameNull_ReturnsFalse()
           
 void testisEncodeEqualsSecondNameJust1Letter_ReturnsFalse()
           
 void testIsVowel_CapitalA_ReturnsTrue()
           
 void testisVowel_SingleVowel_ReturnsTrue()
           
 void testIsVowel_SmallD_ReturnsFalse()
           
 void testleftTorightThenRightToLeft_ALEXANDER_ALEXANDRA_Returns4()
           
 void testleftTorightThenRightToLeft_EINSTEIN_MICHAELA_Returns0()
           
 void testRemoveDoubleConsonants_MISSISSIPPI_RemovedSuccessfully()
           
 void testRemoveDoubleDoubleVowel_BEETLE_NotRemoved()
           
 void testRemoveSingleDoubleConsonants_BUBLE_RemovedSuccessfully()
           
 void testRemoveVowel__AIDAN_Returns_ADN()
           
 void testRemoveVowel__DECLAN_Returns_DCLN()
           
 void testRemoveVowel_ALESSANDRA_Returns_ALSSNDR()
           
 
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

MatchRatingApproachEncoderTest

public MatchRatingApproachEncoderTest()
Method Detail

testAccentRemoval_AllLower_SuccessfullyRemoved

public final void testAccentRemoval_AllLower_SuccessfullyRemoved()

testAccentRemoval_WithSpaces_SuccessfullyRemovedAndSpacesInvariant

public final void testAccentRemoval_WithSpaces_SuccessfullyRemovedAndSpacesInvariant()

testAccentRemoval_UpperandLower_SuccessfullyRemovedAndCaseInvariant

public final void testAccentRemoval_UpperandLower_SuccessfullyRemovedAndCaseInvariant()

testAccentRemoval_MixedWithUnusualChars_SuccessfullyRemovedAndUnusualcharactersInvariant

public final void testAccentRemoval_MixedWithUnusualChars_SuccessfullyRemovedAndUnusualcharactersInvariant()

testAccentRemoval_GerSpanFrenMix_SuccessfullyRemoved

public final void testAccentRemoval_GerSpanFrenMix_SuccessfullyRemoved()

testAccentRemoval_ComprehensiveAccentMix_AllSuccessfullyRemoved

public final void testAccentRemoval_ComprehensiveAccentMix_AllSuccessfullyRemoved()

testAccentRemovalNormalString_NoChange

public final void testAccentRemovalNormalString_NoChange()

testAccentRemoval_NINO_NoChange

public final void testAccentRemoval_NINO_NoChange()

testAccentRemoval_NullValue_ReturnNullSuccessfully

public final void testAccentRemoval_NullValue_ReturnNullSuccessfully()

testRemoveSingleDoubleConsonants_BUBLE_RemovedSuccessfully

public final void testRemoveSingleDoubleConsonants_BUBLE_RemovedSuccessfully()

testRemoveDoubleConsonants_MISSISSIPPI_RemovedSuccessfully

public final void testRemoveDoubleConsonants_MISSISSIPPI_RemovedSuccessfully()

testRemoveDoubleDoubleVowel_BEETLE_NotRemoved

public final void testRemoveDoubleDoubleVowel_BEETLE_NotRemoved()

testIsVowel_CapitalA_ReturnsTrue

public final void testIsVowel_CapitalA_ReturnsTrue()

testIsVowel_SmallD_ReturnsFalse

public final void testIsVowel_SmallD_ReturnsFalse()

testRemoveVowel_ALESSANDRA_Returns_ALSSNDR

public final void testRemoveVowel_ALESSANDRA_Returns_ALSSNDR()

testRemoveVowel__AIDAN_Returns_ADN

public final void testRemoveVowel__AIDAN_Returns_ADN()

testRemoveVowel__DECLAN_Returns_DCLN

public final void testRemoveVowel__DECLAN_Returns_DCLN()

testGetFirstLast3__ALEXANDER_Returns_Aleder

public final void testGetFirstLast3__ALEXANDER_Returns_Aleder()

testGetFirstLast3_PETE_Returns_PETE

public final void testGetFirstLast3_PETE_Returns_PETE()

testleftTorightThenRightToLeft_ALEXANDER_ALEXANDRA_Returns4

public final void testleftTorightThenRightToLeft_ALEXANDER_ALEXANDRA_Returns4()

testleftTorightThenRightToLeft_EINSTEIN_MICHAELA_Returns0

public final void testleftTorightThenRightToLeft_EINSTEIN_MICHAELA_Returns0()

testGetMinRating_7_Return4_Successfully

public final void testGetMinRating_7_Return4_Successfully()

testGetMinRating_1_Returns5_Successfully

public final void testGetMinRating_1_Returns5_Successfully()

testGetMinRating_2_Returns5_Successfully

public final void testGetMinRating_2_Returns5_Successfully()

testgetMinRating_5_Returns4_Successfully

public final void testgetMinRating_5_Returns4_Successfully()

testgetMinRating_5_Returns4_Successfully2

public final void testgetMinRating_5_Returns4_Successfully2()

testgetMinRating_6_Returns4_Successfully

public final void testgetMinRating_6_Returns4_Successfully()

testgetMinRating_7_Returns4_Successfully

public final void testgetMinRating_7_Returns4_Successfully()

testgetMinRating_8_Returns3_Successfully

public final void testgetMinRating_8_Returns3_Successfully()

testgetMinRating_10_Returns3_Successfully

public final void testgetMinRating_10_Returns3_Successfully()

testgetMinRating_11_Returns_3_Successfully

public final void testgetMinRating_11_Returns_3_Successfully()

testGetMinRating_13_Returns_1_Successfully

public final void testGetMinRating_13_Returns_1_Successfully()

testcleanName_SuccessfullyClean

public final void testcleanName_SuccessfullyClean()

testisVowel_SingleVowel_ReturnsTrue

public final void testisVowel_SingleVowel_ReturnsTrue()

testisEncodeEquals_CornerCase_SecondNameNothing_ReturnsFalse

public final void testisEncodeEquals_CornerCase_SecondNameNothing_ReturnsFalse()

testisEncodeEquals_CornerCase_FirstNameNothing_ReturnsFalse

public final void testisEncodeEquals_CornerCase_FirstNameNothing_ReturnsFalse()

testisEncodeEquals_CornerCase_SecondNameJustSpace_ReturnsFalse

public final void testisEncodeEquals_CornerCase_SecondNameJustSpace_ReturnsFalse()

testisEncodeEquals_CornerCase_FirstNameJustSpace_ReturnsFalse

public final void testisEncodeEquals_CornerCase_FirstNameJustSpace_ReturnsFalse()

testisEncodeEquals_CornerCase_SecondNameNull_ReturnsFalse

public final void testisEncodeEquals_CornerCase_SecondNameNull_ReturnsFalse()

testisEncodeEquals_CornerCase_FirstNameNull_ReturnsFalse

public final void testisEncodeEquals_CornerCase_FirstNameNull_ReturnsFalse()

testisEncodeEquals_CornerCase_FirstNameJust1Letter_ReturnsFalse

public final void testisEncodeEquals_CornerCase_FirstNameJust1Letter_ReturnsFalse()

testisEncodeEqualsSecondNameJust1Letter_ReturnsFalse

public final void testisEncodeEqualsSecondNameJust1Letter_ReturnsFalse()

testGetEncoding_HARPER_HRPR

public final void testGetEncoding_HARPER_HRPR()

testGetEncoding_SMITH_to_SMTH

public final void testGetEncoding_SMITH_to_SMTH()

testGetEncoding_SMYTH_to_SMYTH

public final void testGetEncoding_SMYTH_to_SMYTH()

testGetEncoding_Space_to_Nothing

public final void testGetEncoding_Space_to_Nothing()

testGetEncoding_NoSpace_to_Nothing

public final void testGetEncoding_NoSpace_to_Nothing()

testGetEncoding_Null_to_Nothing

public final void testGetEncoding_Null_to_Nothing()

testGetEncoding_One_Letter_to_Nothing

public final void testGetEncoding_One_Letter_to_Nothing()

testCompareNameNullSpace_ReturnsFalseSuccessfully

public final void testCompareNameNullSpace_ReturnsFalseSuccessfully()

testCompareNameSameNames_ReturnsFalseSuccessfully

public final void testCompareNameSameNames_ReturnsFalseSuccessfully()

testCompare_SMITH_SMYTH_SuccessfullyMatched

public final void testCompare_SMITH_SMYTH_SuccessfullyMatched()

testCompare_BURNS_BOURNE_SuccessfullyMatched

public final void testCompare_BURNS_BOURNE_SuccessfullyMatched()

testCompare_ShortNames_AL_ED_WorksButNoMatch

public final void testCompare_ShortNames_AL_ED_WorksButNoMatch()

testCompare_CATHERINE_KATHRYN_SuccessfullyMatched

public final void testCompare_CATHERINE_KATHRYN_SuccessfullyMatched()

testCompare_BRIAN_BRYAN_SuccessfullyMatched

public final void testCompare_BRIAN_BRYAN_SuccessfullyMatched()

testCompare_SEAN_SHAUN_SuccessfullyMatched

public final void testCompare_SEAN_SHAUN_SuccessfullyMatched()

testCompare_COLM_COLIN_WithAccentsAndSymbolsAndSpaces_SuccessfullyMatched

public final void testCompare_COLM_COLIN_WithAccentsAndSymbolsAndSpaces_SuccessfullyMatched()

testCompare_STEPHEN_STEVEN_SuccessfullyMatched

public final void testCompare_STEPHEN_STEVEN_SuccessfullyMatched()

testCompare_STEVEN_STEFAN_SuccessfullyMatched

public final void testCompare_STEVEN_STEFAN_SuccessfullyMatched()

testCompare_STEPHEN_STEFAN_SuccessfullyMatched

public final void testCompare_STEPHEN_STEFAN_SuccessfullyMatched()

testCompare_SAM_SAMUEL_SuccessfullyMatched

public final void testCompare_SAM_SAMUEL_SuccessfullyMatched()

testCompare_MICKY_MICHAEL_SuccessfullyMatched

public final void testCompare_MICKY_MICHAEL_SuccessfullyMatched()

testCompare_OONA_OONAGH_SuccessfullyMatched

public final void testCompare_OONA_OONAGH_SuccessfullyMatched()

testCompare_SOPHIE_SOFIA_SuccessfullyMatched

public final void testCompare_SOPHIE_SOFIA_SuccessfullyMatched()

testCompare_FRANCISZEK_FRANCES_SuccessfullyMatched

public final void testCompare_FRANCISZEK_FRANCES_SuccessfullyMatched()

testCompare_TOMASZ_TOM_SuccessfullyMatched

public final void testCompare_TOMASZ_TOM_SuccessfullyMatched()

testCompare_SmallInput_CARK_Kl_SuccessfullyMatched

public final void testCompare_SmallInput_CARK_Kl_SuccessfullyMatched()

testCompareNameToSingleLetter_KARL_C_DoesNotMatch

public final void testCompareNameToSingleLetter_KARL_C_DoesNotMatch()

testCompare_ZACH_ZAKARIA_SuccessfullyMatched

public final void testCompare_ZACH_ZAKARIA_SuccessfullyMatched()

testCompare_KARL_ALESSANDRO_DoesNotMatch

public final void testCompare_KARL_ALESSANDRO_DoesNotMatch()

testCompare_Forenames_UNA_OONAGH_ShouldSuccessfullyMatchButDoesNot

public final void testCompare_Forenames_UNA_OONAGH_ShouldSuccessfullyMatchButDoesNot()

testCompare_Surname_OSULLIVAN_OSUILLEABHAIN_SuccessfulMatch

public final void testCompare_Surname_OSULLIVAN_OSUILLEABHAIN_SuccessfulMatch()

testCompare_LongSurnames_MORIARTY_OMUIRCHEARTAIGH_DoesNotSuccessfulMatch

public final void testCompare_LongSurnames_MORIARTY_OMUIRCHEARTAIGH_DoesNotSuccessfulMatch()

testCompare_LongSurnames_OMUIRCHEARTAIGH_OMIREADHAIGH_SuccessfulMatch

public final void testCompare_LongSurnames_OMUIRCHEARTAIGH_OMIREADHAIGH_SuccessfulMatch()

testCompare_Surname_COOPERFLYNN_SUPERLYN_SuccessfullyMatched

public final void testCompare_Surname_COOPERFLYNN_SUPERLYN_SuccessfullyMatched()

testCompare_Surname_HAILEY_HALLEY_SuccessfullyMatched

public final void testCompare_Surname_HAILEY_HALLEY_SuccessfullyMatched()

testCompare_Surname_AUERBACH_UHRBACH_SuccessfullyMatched

public final void testCompare_Surname_AUERBACH_UHRBACH_SuccessfullyMatched()

testCompare_Surname_MOSKOWITZ_MOSKOVITZ_SuccessfullyMatched

public final void testCompare_Surname_MOSKOWITZ_MOSKOVITZ_SuccessfullyMatched()

testCompare_Surname_LIPSHITZ_LIPPSZYC_SuccessfullyMatched

public final void testCompare_Surname_LIPSHITZ_LIPPSZYC_SuccessfullyMatched()

testCompare_Surname_LEWINSKY_LEVINSKI_SuccessfullyMatched

public final void testCompare_Surname_LEWINSKY_LEVINSKI_SuccessfullyMatched()

testCompare_Surname_SZLAMAWICZ_SHLAMOVITZ_SuccessfullyMatched

public final void testCompare_Surname_SZLAMAWICZ_SHLAMOVITZ_SuccessfullyMatched()

testCompare_Surname_ROSOCHOWACIEC_ROSOKHOVATSETS_SuccessfullyMatched

public final void testCompare_Surname_ROSOCHOWACIEC_ROSOKHOVATSETS_SuccessfullyMatched()

testCompare_Surname_PRZEMYSL_PSHEMESHIL_SuccessfullyMatched

public final void testCompare_Surname_PRZEMYSL_PSHEMESHIL_SuccessfullyMatched()

testCompare_PETERSON_PETERS_SuccessfullyMatched

public final void testCompare_PETERSON_PETERS_SuccessfullyMatched()

testCompare_MCGOWAN_MCGEOGHEGAN_SuccessfullyMatched

public final void testCompare_MCGOWAN_MCGEOGHEGAN_SuccessfullyMatched()

testCompare_SurnamesCornerCase_MURPHY_Space_NoMatch

public final void testCompare_SurnamesCornerCase_MURPHY_Space_NoMatch()

testCompare_SurnamesCornerCase_MURPHY_NoSpace_NoMatch

public final void testCompare_SurnamesCornerCase_MURPHY_NoSpace_NoMatch()

testCompare_SurnameCornerCase_Nulls_NoMatch

public final void testCompare_SurnameCornerCase_Nulls_NoMatch()

testCompare_Surnames_MURPHY_LYNCH_NoMatchExpected

public final void testCompare_Surnames_MURPHY_LYNCH_NoMatchExpected()

testCompare_Forenames_SEAN_JOHN_MatchExpected

public final void testCompare_Forenames_SEAN_JOHN_MatchExpected()

testCompare_Forenames_SEAN_PETE_NoMatchExpected

public final void testCompare_Forenames_SEAN_PETE_NoMatchExpected()

createStringEncoder

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


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