> Go for it. OK, done. Imports are cleaned up. > If/when things break, you can work up some tests that would have > automatically caught what broke. :)
Yep, I'm looking forward to having a few more automated tests, so that I can modify/refactor/improve without worrying that I might have broken something. I reckon we need to work on 2 levels of testing. 1) Protocol tests. Simple protocol tests, which mimic what you would test using Telnet. These could be based on o.a.j.test.SimpleFileProtocolTest, like the TestAuthenticated test for IMAP. (There's also a very simple SMTP test in the IMAP proposal directory). These will tests the different server protocols (SMTP, POP3, NNTP, IMAP) in a client-independent manner. The downside is that these are tedious to write, and very verbose. 2) Functional tests. These would mimic what you would test using an email client, but use JavaMail as the test client. (See o.a.j.imapserver.InitialMail for a simple example). The upside to this type of testing is it's very easy to test lots of different combinations and permutations (eg Multipart messages, different encodings etc), but the downside is that they only test the protocol functionality that JavaMail uses. I'll probably keep working on the IMAP tests (even though they currently fail!) as I continue working on the IMAP server. Any volunteers for the other protocols? ciao Daz -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
