You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2013/01/07 16:42:55 UTC
svn commit: r1429849 -
/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/MatchRatingApproachEncoderTest.java
Author: ggregory
Date: Mon Jan 7 15:42:55 2013
New Revision: 1429849
URL: http://svn.apache.org/viewvc?rev=1429849&view=rev
Log:
Apply patch https://issues.apache.org/jira/secure/attachment/12561897/CODEC-161.patch
Modified:
commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/MatchRatingApproachEncoderTest.java
Modified: commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/MatchRatingApproachEncoderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/MatchRatingApproachEncoderTest.java?rev=1429849&r1=1429848&r2=1429849&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/MatchRatingApproachEncoderTest.java (original)
+++ commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/MatchRatingApproachEncoderTest.java Mon Jan 7 15:42:55 2013
@@ -34,8 +34,6 @@ import org.junit.Test;
*/
public class MatchRatingApproachEncoderTest extends StringEncoderAbstractTest<MatchRatingApproachEncoder> {
-
-
// ********** BEGIN REGION - TEST SUPPORT METHODS
@Test
@@ -78,6 +76,11 @@ public class MatchRatingApproachEncoderT
public final void testAccentRemoval_NINO_NoChange() {
assertEquals("", this.getStringEncoder().removeAccents(""));
}
+
+ @Test
+ public final void testAccentRemoval_NullValue_ReturnNullSuccessfully() {
+ assertEquals(null, this.getStringEncoder().removeAccents(null));
+ }
@Test
public final void testRemoveSingleDoubleConsonants_BUBLE_RemovedSuccessfully() {
@@ -197,6 +200,16 @@ public class MatchRatingApproachEncoderT
public final void testGetEncoding_One_Letter_to_Nothing() {
assertEquals("", this.getStringEncoder().encode("E"));
}
+
+ @Test
+ public final void testCompareNameNullSpace_ReturnsFalseSuccessfully() {
+ assertEquals(false, getStringEncoder().isEncodeEquals(null, " "));
+ }
+
+ @Test
+ public final void testCompareNameSameNames_ReturnsFalseSuccessfully() {
+ assertEquals(true, getStringEncoder().isEncodeEquals("John", "John"));
+ }
// ***** END REGION - TEST GET MRA ENCODING