: Oh boy, how embarrassing for me. I have never used any unit tests...I : know I know...don't freak out people :) I pretty much just started : really coding in Java. So, is there anyone out there who has time to : help me add these to the code? I would appreciate it and, on the plus : side, the code will be better tested for the community.
Writing unit tests is a lot easier then it sounds .. especially if you are writting them as they are ment to be: test of small "units" of code. take al ook at some of the existing Filter tests, they should give you a good idea of how to write a test... http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java?revision=347991&view=markup http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/analysis/TestLengthFilter.java?view=markup http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/analysis/TestStopFilter.java?revision=382158&view=markup ..the ideal thing is to not only test the expected "good" cases, but also any cases where you expect an error to be generated -- not exactly common in a TokenFilter, but it would be a good idea for example to test what your Filter does when given plain text (ie: not an email address) -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
