commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r794525 - in /commons/proper/codec/trunk/src/test/org/apache/commons/codec: digest/DigestUtilsTest.java language/CaverphoneTest.java language/SoundexTest.java
Date Thu, 16 Jul 2009 04:58:08 GMT
Author: bayard
Date: Thu Jul 16 04:58:08 2009
New Revision: 794525

URL: http://svn.apache.org/viewvc?rev=794525&view=rev
Log:
Improving code coverage

Modified:
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/digest/DigestUtilsTest.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/CaverphoneTest.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/digest/DigestUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/digest/DigestUtilsTest.java?rev=794525&r1=794524&r2=794525&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/digest/DigestUtilsTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/digest/DigestUtilsTest.java
Thu Jul 16 04:58:08 2009
@@ -157,4 +157,8 @@
                 DigestUtils.shaHex(new ByteArrayInputStream(testData)));
 
     }    
+
+    public void testConstructable() {
+        new DigestUtils();
+    }
 }

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/CaverphoneTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/CaverphoneTest.java?rev=794525&r1=794524&r2=794525&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/CaverphoneTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/CaverphoneTest.java
Thu Jul 16 04:58:08 2009
@@ -59,4 +59,10 @@
         }
     }
 
+    public void testIsCaverphoneEquals() {
+        Caverphone caverphone = new Caverphone();
+        assertFalse("Caverphone encodings should not be equal", caverphone.isCaverphoneEqual("Peter",
"Stevenson"));
+        assertTrue("Caverphone encodings should be equal", caverphone.isCaverphoneEqual("Peter",
"Peady"));
+    }
+
 }

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java?rev=794525&r1=794524&r2=794525&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java
Thu Jul 16 04:58:08 2009
@@ -400,4 +400,14 @@
     public void testNewInstance3() {
         assertEquals("W452", new Soundex(Soundex.US_ENGLISH_MAPPING_STRING).soundex("Williams"));
     }
+
+    public void testSoundexUtilsNullBehaviour() {
+        assertEquals(null, SoundexUtils.clean(null));
+        assertEquals("", SoundexUtils.clean(""));
+        assertEquals(0, SoundexUtils.differenceEncoded(null, ""));
+        assertEquals(0, SoundexUtils.differenceEncoded("", null));
+    }
+    public void testSoundexUtilsConstructable() {
+        new SoundexUtils();
+    }
 }



Mime
View raw message