directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny" <>
Subject Re: svn commit: r580770 - in /directory/apacheds/trunk/protocol-ntp/src/test/java/org/apache/directory/server/ntp/messages: ./
Date Sun, 30 Sep 2007 21:31:13 GMT
Hi Stefan,

just a few things :

1) as we are using Junit4, you don't need to specify that the class
extends TestCase
2) you just need to add the @Test annotation in front of each test method :
  @Test public void testEqualsForDifferent() throws ParseException
3) To do so, you will have to add those imports :
import org.junit.Test;
4) For setUp and tearDown, add @Before and @After in front of them
5) The metjod names don't anymore have to start with 'test', but I
think it's a good politic to keep this prefix
6) For assertXXX, just add
import static org.junit.Assert.assertXXX; (static is important)
7)SimpleDateFormat is not synchronized. In case JUnit launch tests in
// (not really the case right now, but in the next version ...), you
might be surprised ;)


PS: I guess that a page on the developper wiki about Junit4 usgae
could have helped ...

Emmanuel L├ęcharny

View raw message