
giovedì settembre 15, 2005
You probably have already read this on Slashdot, but these
first impressions on Junit 4 is worth mentioning.
I know that Junit is not the first unit testing "framework" using annotations to improve simplicity, but this is the de facto industry standard, and for sound reasons.
can't wait to write this. And no more excuses for the not "test addicted"!
import static org.junit.Assert.assertEquals;
public class AdditionTest {
  private int x = 1;
  private int y = 1;
  @Test public void addition() {
   int z = x + y;
   assertEquals(2, z);
  }
}
Trackback URL: http://blogs.sun.com/ugol/entry/junit_4