Unit Testing: Limit to 1 Assertion per test

In order to keep Unit Tests as simple as possible and easy to understand their intent, a good rule of thumb is to limit the number of assertions to 1 per test method.

This article by Dav Astelsdescribes this approach in more detail.

The main benefit from this approach is that each Unit Test method tests exactly one aspect of the system. If it fails then you (or someone else in the future who must debug the code) should know exactly the pupose of the method and therefore have a better idea of what has failed and where to start looking to resolve the issue.

EJB3.0 spec heated discussion on TheServerSide.com

The EJB spec is obviously a hot topic – asking for feedback and comments for consideration for new features/changes for the EJB3.0 spec has ignited a massive flame war on TheServerSide.com between several key players in Enterprise Java world, especially key developers in various open source projects.

Check out the thread to catch up on the argumements between Gavin King (Hibernate), Marc Fleury (JBoss), Rod Johnson (Spring Framework)… and many more 🙂

Sun’s letter to Eclipse

On the eve of Eclipse becoming it’s own legal entity and IBM becoming less involved with the development of the tool platform, Sun published a letter to Eclipse on their website offering help and guidance.

The letter reads like a plea to become involved (now that IBM will not be so dominant within the group), but I guess Sun are genuinely concerned that the Eclipse group could splinter the Java platform, escpecially with concepts such as the SWT (Standard Widget Toolkit) – a replacement for Swing and AWT components that is deliberately platform dependent (for performance and platform UI reasons) – something that Sun is also deliberately trying to avoid (to keep true the ‘write once run anywhere’ philosophy).