I have largely switched to the new style, but Sean is right that there is nearly no difference. The only positive differences that I have seen so far are:
a) inheritance is more flexible since you don't have to explicitly inherit from TestCase b) I can remember how to do class level setup versus test level setup better than I could remember this in older junit. The only negative I have seen is that you tend to use Assert.assertEquals instead of assertEquals. No big deal to me. All the tools I use run both kinds of test interchangeably. +1 to supporting Benson's urge to test. On Fri, Dec 11, 2009 at 9:13 AM, Benson Margulies (JIRA) <[email protected]>wrote: > > [ > https://issues.apache.org/jira/browse/MAHOUT-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789395#action_12789395] > > Benson Margulies commented on MAHOUT-218: > ----------------------------------------- > > I'm setting out to help fill the large gap in unit tests for the colt- > derived code, > and I am a lot more efficient with the > new stuff. So I am grateful to be indulged in > this regard. > > > Update to Junit 4.5 > > ------------------- > > > > Key: MAHOUT-218 > > URL: https://issues.apache.org/jira/browse/MAHOUT-218 > > Project: Mahout > > Issue Type: Task > > Components: Utils > > Affects Versions: 0.4 > > Reporter: Benson Margulies > > Attachments: up-junit.patch > > > > > > Junit 4.5 is back-compatible with the current 3.x, and allows using the > new @annotation scheme. Since the compiler level is set to 1.6, this seems > harmless, and I for one would rather write tests in the new pattern. > > -- > This message is automatically generated by JIRA. > - > You can reply to this email to add a comment to the issue online. > > -- Ted Dunning, CTO DeepDyve
