commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject cvs commit: jakarta-commons/codec/src/test/org/apache/commons/codec/language SoundexTest.java
Date Thu, 04 Dec 2003 23:32:39 GMT
ggregory    2003/12/04 15:32:39

  Modified:    codec/src/test/org/apache/commons/codec/language
                        SoundexTest.java
  Log:
  Added test methods to cover MS SQL Server examples inpired by the mention of SQL Server
on commons-dev.
  
  Revision  Changes    Path
  1.9       +34 -1     jakarta-commons/codec/src/test/org/apache/commons/codec/language/SoundexTest.java
  
  Index: SoundexTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/test/org/apache/commons/codec/language/SoundexTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SoundexTest.java	12 Nov 2003 19:32:52 -0000	1.8
  +++ SoundexTest.java	4 Dec 2003 23:32:39 -0000	1.9
  @@ -326,4 +326,37 @@
           assertEquals("S460", soundex.encode("SCHELLER"));
       }
   
  +    /**
  +     * Examples for MS SQLServer from
  +     * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_setu-sus_3o6w.asp
  +     */
  +    public void testMsSqlServer1() {
  +        assertEquals("S530", this.getEncoder().encode("Smith"));
  +        assertEquals("S530", this.getEncoder().encode("Smythe"));
  +    }
  +
  +    /**
  +     * 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
  +     */
  +    public void testMsSqlServer2() {
  +        this.encodeAll(new String[]{"Erickson", "Erickson", "Erikson", "Ericson", "Ericksen",
"Ericsen"}, "E625");
  +    }
  +    
  +    /**
  +     * Examples for MS SQLServer from
  +     * http://databases.about.com/library/weekly/aa042901a.htm
  +     */
  +    public void testMsSqlServer3() {
  +        assertEquals("A500", this.getEncoder().encode("Ann"));
  +        assertEquals("A536", this.getEncoder().encode("Andrew"));
  +        assertEquals("J530", this.getEncoder().encode("Janet"));
  +        assertEquals("M626", this.getEncoder().encode("Margaret"));
  +        assertEquals("S315", this.getEncoder().encode("Steven"));
  +        assertEquals("M240", this.getEncoder().encode("Michael"));
  +        assertEquals("R163", this.getEncoder().encode("Robert"));
  +        assertEquals("L600", this.getEncoder().encode("Laura"));
  +        assertEquals("A500", this.getEncoder().encode("Anne"));
  +    }
  +
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message