|
66 | 66 | /** |
67 | 67 | * Tests {@link Soundex} |
68 | 68 | * |
69 | | - * @version $Revision: 1.8 $ $Date: 2003/11/12 19:32:52 $ |
| 69 | + * @version $Revision: 1.9 $ $Date: 2003/12/04 23:32:39 $ |
70 | 70 | * @author Rodney Waldhoff |
71 | 71 | * @author Gary Gregory |
72 | 72 | */ |
@@ -326,4 +326,37 @@ public void testMaxLengthLessThan3Fix() throws Exception { |
326 | 326 | assertEquals("S460", soundex.encode("SCHELLER")); |
327 | 327 | } |
328 | 328 |
|
| 329 | + /** |
| 330 | + * Examples for MS SQLServer from |
| 331 | + * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_setu-sus_3o6w.asp |
| 332 | + */ |
| 333 | + public void testMsSqlServer1() { |
| 334 | + assertEquals("S530", this.getEncoder().encode("Smith")); |
| 335 | + assertEquals("S530", this.getEncoder().encode("Smythe")); |
| 336 | + } |
| 337 | + |
| 338 | + /** |
| 339 | + * Examples for MS SQLServer from |
| 340 | + * http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q100/3/65.asp&NoWebContent=1 |
| 341 | + */ |
| 342 | + public void testMsSqlServer2() { |
| 343 | + this.encodeAll(new String[]{"Erickson", "Erickson", "Erikson", "Ericson", "Ericksen", "Ericsen"}, "E625"); |
| 344 | + } |
| 345 | + |
| 346 | + /** |
| 347 | + * Examples for MS SQLServer from |
| 348 | + * http://databases.about.com/library/weekly/aa042901a.htm |
| 349 | + */ |
| 350 | + public void testMsSqlServer3() { |
| 351 | + assertEquals("A500", this.getEncoder().encode("Ann")); |
| 352 | + assertEquals("A536", this.getEncoder().encode("Andrew")); |
| 353 | + assertEquals("J530", this.getEncoder().encode("Janet")); |
| 354 | + assertEquals("M626", this.getEncoder().encode("Margaret")); |
| 355 | + assertEquals("S315", this.getEncoder().encode("Steven")); |
| 356 | + assertEquals("M240", this.getEncoder().encode("Michael")); |
| 357 | + assertEquals("R163", this.getEncoder().encode("Robert")); |
| 358 | + assertEquals("L600", this.getEncoder().encode("Laura")); |
| 359 | + assertEquals("A500", this.getEncoder().encode("Anne")); |
| 360 | + } |
| 361 | + |
329 | 362 | } |
0 commit comments