directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r810002 [1/3] - in /directory: apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/ apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos...
Date Tue, 01 Sep 2009 12:28:03 GMT
Author: elecharny
Date: Tue Sep  1 12:28:00 2009
New Revision: 810002

URL: http://svn.apache.org/viewvc?rev=810002&view=rev
Log:
Removed the Junit 3.8 constructs and replaced them with 4.5

Modified:
    directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/KerberosUtilsTest.java
    directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedDataTest.java
    directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKeyTest.java
    directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressTest.java
    directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressesTest.java
    directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PaDataTest.java
    directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalNameTest.java
    directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncodingTest.java
    directory/apacheds/branches/apacheds-schema/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/unit/AbstractServerTest.java
    directory/apacheds/branches/apacheds-schema/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java
    directory/apacheds/branches/apacheds-schema/protocol-changepw/src/test/java/org/apache/directory/server/changepw/service/CheckPasswordPolicyTest.java
    directory/apacheds/branches/apacheds-schema/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/AbstractDhcpTestCase.java
    directory/apacheds/branches/apacheds-schema/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/DhcpMessageDecoderTest.java
    directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java
    directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoderTest.java
    directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoderTest.java
    directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoderTest.java
    directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoderTest.java
    directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java
    directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoderTest.java
    directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/messages/RecordClassTest.java
    directory/apacheds/branches/apacheds-schema/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
    directory/apacheds/branches/apacheds-schema/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java
    directory/apacheds/branches/apacheds-schema/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java
    directory/apacheds/branches/apacheds-schema/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java
    directory/apacheds/branches/apacheds-schema/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpMessageDecoderTest.java
    directory/apacheds/branches/apacheds-schema/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpMessageEncoderTest.java
    directory/apacheds/branches/apacheds-schema/server-jndi/src/test/java/org/apache/directory/server/configuration/ApacheDSTest.java
    directory/apacheds/branches/apacheds-schema/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractResponseTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AllTests.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addResponse/AddResponseTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authResponse/AuthResponseTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchRequest/BatchRequestTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchResponse/BatchResponseTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse/CompareResponseTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse/DelResponseTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/errorResponse/ErrorResponseTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse/ModifyDNResponseTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/ModifyResponseTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/SearchResponseTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java
    directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultReference/SearchResultReferenceTest.java
    directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/ldif/extractor/SchemaLdifExtractorTest.java
    directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastLdapDnParserTest.java

Modified: directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/KerberosUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/KerberosUtilsTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/KerberosUtilsTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/KerberosUtilsTest.java Tue Sep  1 12:28:00 2009
@@ -24,16 +24,18 @@
 import javax.security.auth.kerberos.KerberosPrincipal;
 
 import org.apache.directory.server.kerberos.shared.KerberosUtils;
-
-import junit.framework.TestCase;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Test the KerberosUtils class
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class KerberosUtilsTest extends TestCase
+public class KerberosUtilsTest
 {
+    @Before
     public void setUp()
     {
         // First setup a default realm
@@ -42,6 +44,7 @@
     }
 
     
+    @Test
     public void testKerberosNameSimple() throws Exception
     {
         KerberosPrincipal kp = new KerberosPrincipal( "abc" );
@@ -66,6 +69,7 @@
     */
 
 
+    @Test
     public void testKerberosNameSimpleWithRealm() throws Exception
     {
         KerberosPrincipal kp = new KerberosPrincipal( "abc@APACHE.ORG" );
@@ -75,6 +79,7 @@
         assertEquals( "abc", names.get( 0 ) );
     }
     
+    @Test
     public void testKerberosNameThree() throws Exception
     {
         KerberosPrincipal kp = new KerberosPrincipal( "abc/def/ghi" );
@@ -86,6 +91,7 @@
         assertEquals( "ghi", names.get( 2 ) );
     }
 
+    @Test
     public void testKerberosNameThreeWithRealm() throws Exception
     {
         KerberosPrincipal kp = new KerberosPrincipal( "abc/def/ghi@APACHE.ORG" );

Modified: directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedDataTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedDataTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedDataTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedDataTest.java Tue Sep  1 12:28:00 2009
@@ -25,9 +25,9 @@
 
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.shared.ldap.util.StringTools;
-
-import junit.framework.TestCase;
-
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 /**
  * Test the EncryptedData encoding and decoding
@@ -35,8 +35,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 542147 $, $Date: 2007-05-28 10:14:21 +0200 (Mon, 28 May 2007) $
  */
-public class EncryptedDataTest extends TestCase
+public class EncryptedDataTest
 {
+    @Test
     public void testEncodingEncryptedData() throws Exception
     {
         EncryptedData ed = new EncryptedData( EncryptionType.AES128_CTS_HMAC_SHA1_96, 1, new byte[]
@@ -61,6 +62,7 @@
     }
 
 
+    @Test
     public void testEncodingEncryptedDataNullCipher() throws Exception
     {
         EncryptedData ed = new EncryptedData( EncryptionType.AES128_CTS_HMAC_SHA1_96, 1, null );
@@ -84,6 +86,7 @@
     }
 
 
+    @Test
     public void testEncodingEncryptedDataNoKvno() throws Exception
     {
         EncryptedData ed = new EncryptedData( EncryptionType.AES128_CTS_HMAC_SHA1_96, new byte[]
@@ -106,6 +109,7 @@
     }
 
 
+    @Test
     public void testEncodingEncryptedDataNoKvnoNullCipher() throws Exception
     {
         EncryptedData ed = new EncryptedData( EncryptionType.AES128_CTS_HMAC_SHA1_96, null );

Modified: directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKeyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKeyTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKeyTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKeyTest.java Tue Sep  1 12:28:00 2009
@@ -27,9 +27,8 @@
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.kerberos.shared.io.encoder.EncryptionKeyEncoder;
 import org.apache.directory.shared.asn1.codec.EncoderException;
-
-import junit.framework.TestCase;
-
+import org.junit.Test;
+import static org.junit.Assert.assertTrue;
 
 /**
  * Test the EncryptionKey encoding and decoding
@@ -37,8 +36,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 542147 $, $Date: 2007-05-28 10:14:21 +0200 (Mon, 28 May 2007) $
  */
-public class EncryptionKeyTest extends TestCase
+public class EncryptionKeyTest
 {
+    @Test
     public void testEncodingFast() throws Exception
     {
         EncryptionKey ec = new EncryptionKey( EncryptionType.AES128_CTS_HMAC_SHA1_96, new byte[]
@@ -61,6 +61,7 @@
     }
 
 
+    @Test
     public void testEncodingNoStructureFast() throws Exception
     {
         EncryptionKey ec = new EncryptionKey( EncryptionType.AES128_CTS_HMAC_SHA1_96, null );
@@ -102,6 +103,7 @@
      }
      */
 
+    @Test
     public void testEncodingSlow() throws Exception
     {
         EncryptionKey ec = new EncryptionKey( EncryptionType.AES128_CTS_HMAC_SHA1_96, new byte[]
@@ -122,6 +124,7 @@
     }
 
 
+    @Test
     public void testPerfSlow() throws IOException
     {
         EncryptionKey ec = new EncryptionKey( EncryptionType.AES128_CTS_HMAC_SHA1_96, new byte[]
@@ -141,6 +144,7 @@
     }
 
 
+    @Test
     public void testPerfFast() throws EncoderException
     {
         EncryptionKey ec = new EncryptionKey( EncryptionType.AES128_CTS_HMAC_SHA1_96, new byte[]

Modified: directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressTest.java Tue Sep  1 12:28:00 2009
@@ -24,9 +24,8 @@
 import java.util.Arrays;
 
 import org.apache.directory.server.kerberos.shared.messages.value.types.HostAddrType;
-
-import junit.framework.TestCase;
-
+import org.junit.Test;
+import static org.junit.Assert.assertTrue;
 
 /**
  * Test the HostAddress encoding and decoding
@@ -34,8 +33,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 542147 $, $Date: 2007-05-28 10:14:21 +0200 (Mon, 28 May 2007) $
  */
-public class HostAddressTest extends TestCase
+public class HostAddressTest
 {
+    @Test
     public void testEncodingHostAddressIP() throws Exception
     {
         HostAddress ha = new HostAddress( HostAddrType.ADDRTYPE_INET, new byte[]
@@ -59,6 +59,7 @@
     }
 
 
+    @Test
     public void testEncodingHostAddressIPNullAddress() throws Exception
     {
         HostAddress ha = new HostAddress( HostAddrType.ADDRTYPE_INET, null );

Modified: directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressesTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressesTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressesTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressesTest.java Tue Sep  1 12:28:00 2009
@@ -24,9 +24,8 @@
 import java.util.Arrays;
 
 import org.apache.directory.server.kerberos.shared.messages.value.types.HostAddrType;
-
-import junit.framework.TestCase;
-
+import org.junit.Test;
+import static org.junit.Assert.assertTrue;
 
 /**
  * Test the HostAddresses encoding and decoding
@@ -34,8 +33,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 542147 $, $Date: 2007-05-28 10:14:21 +0200 (Mon, 28 May 2007) $
  */
-public class HostAddressesTest extends TestCase
+public class HostAddressesTest
 {
+    @Test
     public void testEncodingHostAddressesIPOneAddresses() throws Exception
     {
         HostAddress[] ha = new HostAddress[]
@@ -63,6 +63,7 @@
     }
 
 
+    @Test
     public void testEncodingHostAddressesIP3Addresses() throws Exception
     {
         HostAddress[] ha = new HostAddress[]
@@ -104,6 +105,7 @@
     }
 
 
+    @Test
     public void testEncodingHostAddressIPNullAddress() throws Exception
     {
         HostAddresses has = new HostAddresses( null );

Modified: directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PaDataTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PaDataTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PaDataTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PaDataTest.java Tue Sep  1 12:28:00 2009
@@ -24,9 +24,8 @@
 import java.util.Arrays;
 
 import org.apache.directory.server.kerberos.shared.messages.value.types.PaDataType;
-
-import junit.framework.TestCase;
-
+import org.junit.Test;
+import static org.junit.Assert.assertTrue;
 
 /**
  * Test the PaData encoding and decoding
@@ -34,8 +33,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 542147 $, $Date: 2007-05-28 10:14:21 +0200 (Mon, 28 May 2007) $
  */
-public class PaDataTest extends TestCase
+public class PaDataTest
 {
+    @Test
     public void testEncodingPreAuthenticationData() throws Exception
     {
         PaData pad = new PaData( PaDataType.PA_ASF3_SALT, new byte[]
@@ -59,6 +59,7 @@
     }
 
 
+    @Test
     public void testEncodingNullPreAuthenticationData() throws Exception
     {
         PaData pad = new PaData( PaDataType.PA_ASF3_SALT, null );

Modified: directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalNameTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalNameTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalNameTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalNameTest.java Tue Sep  1 12:28:00 2009
@@ -24,9 +24,8 @@
 
 import org.apache.directory.server.kerberos.shared.messages.value.types.PrincipalNameType;
 import org.apache.directory.shared.ldap.util.StringTools;
-
-import junit.framework.TestCase;
-
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Test the PrincipalName encoding and decoding
@@ -34,8 +33,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 542147 $, $Date: 2007-05-28 10:14:21 +0200 (Mon, 28 May 2007) $
  */
-public class PrincipalNameTest extends TestCase
+public class PrincipalNameTest
 {
+    @Test
     public void testEncodingPrincipalNameOneName() throws Exception
     {
         PrincipalName principal = new PrincipalName( "Test@APACHE", PrincipalNameType.KRB_NT_PRINCIPAL );
@@ -59,6 +59,7 @@
     }
 
 
+    @Test
     public void testEncodingPrincipalName3names() throws Exception
     {
         PrincipalName principal = new PrincipalName( "Test1@APACHE", PrincipalNameType.KRB_NT_PRINCIPAL );
@@ -88,6 +89,7 @@
     }
 
 
+    @Test
     public void testEncodingPrincipalNameNullName() throws Exception
     {
         PrincipalName principal = new PrincipalName( null, PrincipalNameType.KRB_NT_PRINCIPAL );

Modified: directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncodingTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncodingTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncodingTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncodingTest.java Tue Sep  1 12:28:00 2009
@@ -24,9 +24,8 @@
 import java.util.Arrays;
 
 import org.apache.directory.server.kerberos.shared.messages.value.types.TransitedEncodingType;
-
-import junit.framework.TestCase;
-
+import org.junit.Test;
+import static org.junit.Assert.assertTrue;
 
 /**
  * Test the TransitedEncoding encoding and decoding
@@ -34,8 +33,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 542147 $, $Date: 2007-05-28 10:14:21 +0200 (Mon, 28 May 2007) $
  */
-public class TransitedEncodingTest extends TestCase
+public class TransitedEncodingTest
 {
+    @Test
     public void testEncodingFast() throws Exception
     {
         TransitedEncoding te = new TransitedEncoding( TransitedEncodingType.DOMAIN_X500_COMPRESS, new byte[]
@@ -58,6 +58,7 @@
     }
 
 
+    @Test
     public void testEncodingNoStructureFast() throws Exception
     {
         TransitedEncoding te = new TransitedEncoding( TransitedEncodingType.DOMAIN_X500_COMPRESS, null );

Modified: directory/apacheds/branches/apacheds-schema/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/unit/AbstractServerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/unit/AbstractServerTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/unit/AbstractServerTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/unit/AbstractServerTest.java Tue Sep  1 12:28:00 2009
@@ -233,8 +233,6 @@
     /**
      * Get's the initial context factory for the provider's ou=system context
      * root.
-     *
-     * @see junit.framework.TestCase#setUp()
      */
     @BeforeClass
     public static void setUp() throws Exception
@@ -372,8 +370,6 @@
 
     /**
      * Sets the system context root to null.
-     *
-     * @see junit.framework.TestCase#tearDown()
      */
     @AfterClass
     public static void tearDown() throws Exception

Modified: directory/apacheds/branches/apacheds-schema/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java Tue Sep  1 12:28:00 2009
@@ -29,7 +29,6 @@
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
-import junit.framework.TestCase;
 import org.apache.directory.server.changepw.ChangePasswordServer;
 import org.apache.directory.server.changepw.io.ChangePasswordDataEncoder;
 import org.apache.directory.server.changepw.messages.ChangePasswordError;
@@ -60,7 +59,8 @@
 import org.apache.directory.server.kerberos.shared.store.TicketFactory;
 import org.apache.mina.core.future.WriteFuture;
 import org.apache.mina.core.session.DummySession;
-
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Tests the ChangePasswordProtocolHandler.
@@ -68,7 +68,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ChangepwProtocolHandlerTest extends TestCase
+public class ChangepwProtocolHandlerTest
 {
     /**
      * The Change Password SUCCESS result code.
@@ -100,6 +100,7 @@
     /**
      * Tests the protocol version number, which must be '1'.
      */
+    @Test
     public void testProtocolVersionNumber()
     {
         ChangePasswordRequest message = new ChangePasswordRequest( ( short ) 2, null, null );
@@ -116,6 +117,7 @@
      * Tests when a service ticket is missing that the request is rejected with
      * the correct error message.
      */
+    @Test
     public void testMissingTicket()
     {
         ChangePasswordRequest message = new ChangePasswordRequest( ( short ) 1, null, null );
@@ -134,6 +136,7 @@
      *
      * @throws Exception
      */
+    @Test
     public void testInitialFlagRequired() throws Exception
     {
         KerberosPrincipal clientPrincipal = new KerberosPrincipal( "hnelson@EXAMPLE.COM" );
@@ -210,6 +213,7 @@
      */
 
 
+    @Test
     public void testSetPassword() throws Exception
     {
         KerberosPrincipal clientPrincipal = new KerberosPrincipal( "hnelson@EXAMPLE.COM" );

Modified: directory/apacheds/branches/apacheds-schema/protocol-changepw/src/test/java/org/apache/directory/server/changepw/service/CheckPasswordPolicyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-changepw/src/test/java/org/apache/directory/server/changepw/service/CheckPasswordPolicyTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-changepw/src/test/java/org/apache/directory/server/changepw/service/CheckPasswordPolicyTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-changepw/src/test/java/org/apache/directory/server/changepw/service/CheckPasswordPolicyTest.java Tue Sep  1 12:28:00 2009
@@ -22,8 +22,9 @@
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
-import junit.framework.TestCase;
-
+import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
 
 /**
  * Tests {@link CheckPasswordPolicy}.
@@ -31,7 +32,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class CheckPasswordPolicyTest extends TestCase
+public class CheckPasswordPolicyTest
 {
     private int passwordLength = 6;
     private int categoryCount = 3;
@@ -43,6 +44,7 @@
     /**
      * Tests that a good password is valid according to all policy checks.
      */
+    @Test
     public void testGoodPassword()
     {
         String username = "Enrique Rodriguez";
@@ -57,6 +59,7 @@
     /**
      * Tests that a bad password fails all validity checks.
      */
+    @Test
     public void testBadPassword()
     {
         String username = "Erin Randall";
@@ -71,6 +74,7 @@
     /**
      * Tests variations of a password where the password includes tokens of the username.
      */
+    @Test
     public void testPrincipalAsUsername()
     {
         String username = new KerberosPrincipal( "erodriguez@EXAMPLE.COM" ).getName();

Modified: directory/apacheds/branches/apacheds-schema/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/AbstractDhcpTestCase.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/AbstractDhcpTestCase.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/AbstractDhcpTestCase.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/AbstractDhcpTestCase.java Tue Sep  1 12:28:00 2009
@@ -25,8 +25,6 @@
 import java.io.InputStream;
 import java.nio.ByteBuffer;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dhcp.messages.DhcpMessage;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -36,7 +34,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public abstract class AbstractDhcpTestCase extends TestCase
+public abstract class AbstractDhcpTestCase
 {
     protected static final int MINIMUM_DHCP_DATAGRAM_SIZE = 576;
     protected final Logger log;
@@ -48,7 +46,7 @@
     }
 
 
-    public AbstractDhcpTestCase(Class subclass)
+    public AbstractDhcpTestCase(Class<?> subclass)
     {
         log = LoggerFactory.getLogger( subclass );
     }

Modified: directory/apacheds/branches/apacheds-schema/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/DhcpMessageDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/DhcpMessageDecoderTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/DhcpMessageDecoderTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/DhcpMessageDecoderTest.java Tue Sep  1 12:28:00 2009
@@ -25,6 +25,7 @@
 
 import org.apache.directory.server.dhcp.io.DhcpMessageDecoder;
 import org.apache.directory.server.dhcp.messages.DhcpMessage;
+import org.junit.Test;
 
 
 /**
@@ -42,6 +43,7 @@
     }
 
 
+    @Test
     public void testParseDiscover() throws Exception
     {
         requestByteBuffer = getByteBufferFromFile( "DHCPDISCOVER.pdu" );
@@ -53,6 +55,7 @@
     }
 
 
+    @Test
     public void testParseOffer() throws Exception
     {
         requestByteBuffer = getByteBufferFromFile( "DHCPOFFER.pdu" );

Modified: directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java Tue Sep  1 12:28:00 2009
@@ -28,8 +28,6 @@
 import java.util.Collections;
 import java.util.List;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dns.messages.DnsMessage;
 import org.apache.directory.server.dns.messages.DnsMessageModifier;
 import org.apache.directory.server.dns.messages.MessageType;
@@ -48,7 +46,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public abstract class AbstractDnsTestCase extends TestCase
+public abstract class AbstractDnsTestCase
 {
     protected static final int MINIMUM_DNS_DATAGRAM_SIZE = 576;
 

Modified: directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoderTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoderTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoderTest.java Tue Sep  1 12:28:00 2009
@@ -24,11 +24,11 @@
 import java.net.InetAddress;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dns.store.DnsAttribute;
 import org.apache.mina.core.buffer.IoBuffer;
-
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Tests for the A resource record decoder.
@@ -36,7 +36,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 501160 $, $Date: 2007-01-29 12:41:33 -0700 (Mon, 29 Jan 2007) $
  */
-public class AddressRecordDecoderTest extends TestCase
+public class AddressRecordDecoderTest
 {
     InetAddress address;
     IoBuffer inputBuffer;
@@ -44,6 +44,7 @@
     AddressRecordDecoder decoder;
 
 
+    @Before
     public void setUp() throws Exception
     {
         address = InetAddress.getByName( "127.0.0.1" );
@@ -55,9 +56,10 @@
     }
 
 
+    @Test
     public void testDecode() throws Exception
     {
-        Map attributes = decoder.decode( inputBuffer, ( short ) address.getAddress().length );
+        Map<String, Object> attributes = decoder.decode( inputBuffer, ( short ) address.getAddress().length );
         assertEquals( address, attributes.get( DnsAttribute.IP_ADDRESS ) );
     }
 }

Modified: directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoderTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoderTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoderTest.java Tue Sep  1 12:28:00 2009
@@ -24,11 +24,12 @@
 import java.net.InetAddress;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dns.store.DnsAttribute;
 import org.apache.mina.core.buffer.IoBuffer;
+import org.junit.Before;
+import org.junit.Test;
 
+import static org.junit.Assert.assertEquals;
 
 /**
  * Tests for the AAAA resource record decoder.
@@ -36,7 +37,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 501160 $, $Date: 2007-01-29 12:41:33 -0700 (Mon, 29 Jan 2007) $
  */
-public class IPv6RecordDecoderTest extends TestCase
+public class IPv6RecordDecoderTest
 {
     InetAddress address;
     IoBuffer inputBuffer;
@@ -44,6 +45,7 @@
     IPv6RecordDecoder decoder;
 
 
+    @Before
     public void setUp() throws Exception
     {
         address = InetAddress.getByName( "0:0:0:0:0:0:0:1" );
@@ -55,10 +57,10 @@
     }
 
 
+    @Test
     public void testDecode() throws Exception
     {
-        Map attributes = decoder.decode( inputBuffer, ( short ) address.getAddress().length );
+        Map<String, Object> attributes = decoder.decode( inputBuffer, ( short ) address.getAddress().length );
         assertEquals( address, attributes.get( DnsAttribute.IP_ADDRESS ) );
     }
-
 }

Modified: directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoderTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoderTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoderTest.java Tue Sep  1 12:28:00 2009
@@ -23,11 +23,11 @@
 
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dns.store.DnsAttribute;
 import org.apache.mina.core.buffer.IoBuffer;
-
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Tests for the MX resource record decoder.
@@ -35,7 +35,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 501160 $, $Date: 2007-01-29 12:41:33 -0700 (Mon, 29 Jan 2007) $
  */
-public class MailExchangeRecordDecoderTest extends TestCase
+public class MailExchangeRecordDecoderTest
 {
     IoBuffer inputBuffer;
 
@@ -47,6 +47,7 @@
     MailExchangeRecordDecoder decoder;
 
 
+    @Before
     public void setUp()
     {
         inputBuffer = IoBuffer.allocate( 128 );
@@ -64,9 +65,10 @@
     }
 
 
+    @Test
     public void testDecode() throws Exception
     {
-        Map attributes = decoder.decode( inputBuffer, ( short ) inputBuffer.remaining() );
+        Map<String, Object> attributes = decoder.decode( inputBuffer, ( short ) inputBuffer.remaining() );
         assertEquals( preference, attributes.get( DnsAttribute.MX_PREFERENCE ) );
         assertEquals( domainName, attributes.get( DnsAttribute.DOMAIN_NAME ) );
     }

Modified: directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoderTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoderTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoderTest.java Tue Sep  1 12:28:00 2009
@@ -23,11 +23,11 @@
 
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dns.store.DnsAttribute;
 import org.apache.mina.core.buffer.IoBuffer;
-
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Tests for the NS resource record decoder.
@@ -35,7 +35,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 501160 $, $Date: 2007-01-29 12:41:33 -0700 (Mon, 29 Jan 2007) $
  */
-public class NameServerRecordDecoderTest extends TestCase
+public class NameServerRecordDecoderTest
 {
     IoBuffer inputBuffer;
 
@@ -46,6 +46,7 @@
     NameServerRecordDecoder decoder;
 
 
+    @Before
     public void setUp()
     {
         inputBuffer = IoBuffer.allocate( 128 );
@@ -62,9 +63,10 @@
     }
 
 
+    @Test
     public void testDecode() throws Exception
     {
-        Map attributes = decoder.decode( inputBuffer, ( short ) inputBuffer.remaining() );
+        Map<String, Object> attributes = decoder.decode( inputBuffer, ( short ) inputBuffer.remaining() );
         assertEquals( domainName, attributes.get( DnsAttribute.DOMAIN_NAME ) );
     }
 }

Modified: directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java Tue Sep  1 12:28:00 2009
@@ -24,14 +24,14 @@
 import java.net.UnknownHostException;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dns.messages.RecordClass;
 import org.apache.directory.server.dns.messages.RecordType;
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.messages.ResourceRecordImpl;
 import org.apache.mina.core.buffer.IoBuffer;
-
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * A base class for testing different types of ResourceRecordEncoders.  It 
@@ -41,7 +41,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 501160 $, $Date: 2007-01-29 12:41:33 -0700 (Mon, 29 Jan 2007) $
  */
-public abstract class AbstractResourceRecordEncoderTest extends TestCase
+public abstract class AbstractResourceRecordEncoderTest
 {
     IoBuffer expectedData;
     String domainName = "herse.apache.org";
@@ -50,6 +50,7 @@
     ResourceRecord record;
 
 
+    @Before
     public void setUp() throws UnknownHostException
     {
         setUpResourceData();
@@ -71,6 +72,7 @@
     }
 
 
+    @Test
     public void testEncode() throws IOException
     {
         IoBuffer outBuffer = IoBuffer.allocate( 128 );

Modified: directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoderTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoderTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoderTest.java Tue Sep  1 12:28:00 2009
@@ -21,13 +21,13 @@
 package org.apache.directory.server.dns.io.encoder;
 
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dns.messages.QuestionRecord;
 import org.apache.directory.server.dns.messages.RecordClass;
 import org.apache.directory.server.dns.messages.RecordType;
 import org.apache.mina.core.buffer.IoBuffer;
-
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Tests for the Question record encoder.
@@ -35,7 +35,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 501160 $, $Date: 2007-01-29 12:41:33 -0700 (Mon, 29 Jan 2007) $
  */
-public class QuestionRecordEncoderTest extends TestCase
+public class QuestionRecordEncoderTest
 {
     IoBuffer expectedData;
 
@@ -49,6 +49,7 @@
     QuestionRecord record = new QuestionRecord( name, type, rClass );
 
 
+    @Before
     public void setUp()
     {
         encoder = new QuestionRecordEncoder();
@@ -66,6 +67,7 @@
     }
 
 
+    @Test
     public void testEncode()
     {
         IoBuffer out = IoBuffer.allocate( 128 );

Modified: directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/messages/RecordClassTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/messages/RecordClassTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/messages/RecordClassTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-dns/src/test/java/org/apache/directory/server/dns/messages/RecordClassTest.java Tue Sep  1 12:28:00 2009
@@ -19,8 +19,8 @@
  */
 package org.apache.directory.server.dns.messages;
 
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 
 /**
@@ -29,11 +29,12 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class RecordClassTest extends TestCase
+public class RecordClassTest
 {
     /**
      * Tests conversion of ordinals to RecordClass enums.
      */
+    @Test
     public void testRecordClassConversion()
     {
         assertEquals( RecordClass.IN, RecordClass.convert( ( short ) 1 ) );

Modified: directory/apacheds/branches/apacheds-schema/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java Tue Sep  1 12:28:00 2009
@@ -59,7 +59,8 @@
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
 
 /**
  * An {@link AbstractServerTest} testing SASL GSSAPI authentication

Modified: directory/apacheds/branches/apacheds-schema/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java Tue Sep  1 12:28:00 2009
@@ -22,18 +22,18 @@
 
 import java.util.Arrays;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.kerberos.shared.messages.value.KdcOptions;
 import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlag;
 import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
-
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class OptionsTest extends TestCase
+public class OptionsTest
 {
     private byte[] fpriOptions =
         { ( byte ) 0x50, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x10 };
@@ -42,6 +42,7 @@
     /**
      * Tests converting the ticket flags to a descriptive String.
      */
+    @Test
     public void testToString()
     {
         TicketFlags flags = new TicketFlags();
@@ -56,6 +57,7 @@
     /**
      * Tests that setting flags is idempotent.
      */
+    @Test
     public void testDuplicateSetting()
     {
         TicketFlags flags = new TicketFlags();
@@ -71,6 +73,7 @@
     /**
      * Tests the basic construction of the {@link KdcOptions}.
      */
+    @Test
     public void testConstruction()
     {
         KdcOptions options = new KdcOptions( fpriOptions );

Modified: directory/apacheds/branches/apacheds-schema/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java Tue Sep  1 12:28:00 2009
@@ -20,7 +20,6 @@
 package org.apache.directory.server.ldap;
 
 
-import junit.framework.TestCase;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.server.ldap.handlers.AbandonHandler;
@@ -44,7 +43,9 @@
 import org.apache.directory.shared.ldap.message.InternalSearchRequest;
 import org.apache.directory.shared.ldap.message.InternalUnbindRequest;
 import org.apache.mina.core.session.IoSession;
-
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * This test is simply used to test that handlers can be set properly.
@@ -52,27 +53,15 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class SettingAlternativeHandlersTest extends TestCase
+public class SettingAlternativeHandlersTest
 {
     LdapServer ldapServer;
 
 
+    @Before
     public void setUp() throws Exception
     {
         ldapServer = new LdapServer();
-        
-        if ( getName().equals( "testAlternativeConfiguration" ) )
-        {
-            ldapServer.setAbandonHandler( new BogusAbandonHandler() );
-            ldapServer.setAddHandler( new BogusAddHandler() );
-            ldapServer.setBindHandler( new BogusBindHandler() );
-            ldapServer.setCompareHandler( new BogusCompareHandler() );
-            ldapServer.setDeleteHandler( new BogusDeleteHandler() );
-            ldapServer.setModifyDnHandler( new BogusModifyDnHandler() );
-            ldapServer.setModifyHandler( new BogusModifyHandler() );
-            ldapServer.setSearchHandler( new BogusSearchHandler() );
-            ldapServer.setUnbindHandler( new BogusUnbindHandler() );
-        }
     }
 
 
@@ -83,6 +72,7 @@
      * @throws LdapNamingException if there are problems initializing the
      * provider
      */
+    @Test
     public void testDefaultOperation() throws LdapNamingException
     {
         assertEquals( ldapServer.getName(), LdapServer.SERVICE_NAME );
@@ -96,8 +86,19 @@
      * @throws LdapNamingException if there are problems initializing the
      * provider
      */
+    @Test
     public void testAlternativeConfiguration() throws LdapNamingException
     {
+        ldapServer.setAbandonHandler( new BogusAbandonHandler() );
+        ldapServer.setAddHandler( new BogusAddHandler() );
+        ldapServer.setBindHandler( new BogusBindHandler() );
+        ldapServer.setCompareHandler( new BogusCompareHandler() );
+        ldapServer.setDeleteHandler( new BogusDeleteHandler() );
+        ldapServer.setModifyDnHandler( new BogusModifyDnHandler() );
+        ldapServer.setModifyHandler( new BogusModifyHandler() );
+        ldapServer.setSearchHandler( new BogusSearchHandler() );
+        ldapServer.setUnbindHandler( new BogusUnbindHandler() );
+
         assertEquals( ldapServer.getAbandonHandler().getClass(), BogusAbandonHandler.class  );
         assertEquals( ldapServer.getAddHandler().getClass(), BogusAddHandler.class  );
         assertEquals( ldapServer.getBindHandler().getClass(), BogusBindHandler.class  );

Modified: directory/apacheds/branches/apacheds-schema/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java Tue Sep  1 12:28:00 2009
@@ -23,8 +23,6 @@
 import java.net.InetAddress;
 import java.util.concurrent.Executors;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
 import org.apache.commons.net.ntp.NTPUDPClient;
 import org.apache.commons.net.ntp.TimeInfo;
 import org.apache.directory.server.protocol.shared.transport.TcpTransport;
@@ -35,7 +33,7 @@
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-
+import static org.junit.Assert.assertTrue;
 
 /**
  * An {@link AbstractServerTest} testing the Network Time Protocol (NTP).
@@ -43,7 +41,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class NtpITest extends TestCase
+public class NtpITest
 {
     private NtpServer ntpConfig;
     private int port;
@@ -84,12 +82,12 @@
 
         TimeInfo timeInfo = ntp.getTime( host, port );
         long returnTime = timeInfo.getReturnTime();
-        Assert.assertTrue( currentTime - returnTime < 1000 );
+        assertTrue( currentTime - returnTime < 1000 );
 
         timeInfo.computeDetails();
 
-        Assert.assertTrue( 0 < timeInfo.getOffset() && timeInfo.getOffset() < 1000 );
-        Assert.assertTrue( 0 < timeInfo.getDelay() && timeInfo.getDelay() < 1000 );
+        assertTrue( 0 < timeInfo.getOffset() && timeInfo.getOffset() < 1000 );
+        assertTrue( 0 < timeInfo.getDelay() && timeInfo.getDelay() < 1000 );
     }
 
 

Modified: directory/apacheds/branches/apacheds-schema/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpMessageDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpMessageDecoderTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpMessageDecoderTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpMessageDecoderTest.java Tue Sep  1 12:28:00 2009
@@ -22,10 +22,9 @@
 
 import java.nio.ByteBuffer;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.ntp.io.NtpMessageDecoder;
 import org.apache.directory.server.ntp.messages.NtpMessage;
+import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -34,7 +33,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class NtpMessageDecoderTest extends TestCase
+public class NtpMessageDecoderTest
 {
     /** the log for this class */
     private static final Logger log = LoggerFactory.getLogger( NtpMessageDecoderTest.class );
@@ -63,6 +62,7 @@
      *
      * @throws Exception
      */
+    @Test
     public void testParseClient() throws Exception
     {
         ByteBuffer buffer = ByteBuffer.wrap( clientRequest );
@@ -77,6 +77,7 @@
      *
      * @throws Exception
      */
+    @Test
     public void testParseServer() throws Exception
     {
         ByteBuffer buffer = ByteBuffer.wrap( serverResponse );

Modified: directory/apacheds/branches/apacheds-schema/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpMessageEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpMessageEncoderTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpMessageEncoderTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpMessageEncoderTest.java Tue Sep  1 12:28:00 2009
@@ -22,8 +22,6 @@
 
 import java.nio.ByteBuffer;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.ntp.io.NtpMessageDecoder;
 import org.apache.directory.server.ntp.io.NtpMessageEncoder;
 import org.apache.directory.server.ntp.messages.LeapIndicatorType;
@@ -33,6 +31,7 @@
 import org.apache.directory.server.ntp.messages.NtpTimeStamp;
 import org.apache.directory.server.ntp.messages.ReferenceIdentifier;
 import org.apache.directory.server.ntp.messages.StratumType;
+import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -41,7 +40,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class NtpMessageEncoderTest extends TestCase
+public class NtpMessageEncoderTest
 {
     /** the log for this class */
     private static final Logger log = LoggerFactory.getLogger( NtpMessageEncoderTest.class );
@@ -52,6 +51,7 @@
      *
      * @throws Exception
      */
+    @Test
     public void testEncodeMessage() throws Exception
     {
         NtpMessageModifier modifier = new NtpMessageModifier();

Modified: directory/apacheds/branches/apacheds-schema/server-jndi/src/test/java/org/apache/directory/server/configuration/ApacheDSTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-jndi/src/test/java/org/apache/directory/server/configuration/ApacheDSTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-jndi/src/test/java/org/apache/directory/server/configuration/ApacheDSTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-jndi/src/test/java/org/apache/directory/server/configuration/ApacheDSTest.java Tue Sep  1 12:28:00 2009
@@ -20,11 +20,10 @@
 package org.apache.directory.server.configuration;
 
 
+import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import junit.framework.TestCase;
-
 
 /**
  * TODO ApacheDSTest.
@@ -32,11 +31,12 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ApacheDSTest extends TestCase
+public class ApacheDSTest
 {
     private static final Logger LOG = LoggerFactory.getLogger( ApacheDSTest.class );
 
    
+    @Test
     public void testBogus()
     {
         System.out.println( "TODO: Fix this the real test case and delete me!" );

Modified: directory/apacheds/branches/apacheds-schema/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java Tue Sep  1 12:28:00 2009
@@ -36,7 +36,6 @@
 import javax.naming.ldap.LdapContext;
 
 import junit.framework.AssertionFailedError;
-import junit.framework.TestCase;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.constants.ServerDNConstants;
@@ -64,6 +63,8 @@
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.mina.transport.socket.nio.NioSocketAcceptor;
 import org.apache.mina.util.AvailablePortFinder;
+import org.junit.After;
+import org.junit.Before;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -75,7 +76,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public abstract class AbstractServerTest extends TestCase
+public abstract class AbstractServerTest
 {
     private static final Logger LOG = LoggerFactory.getLogger( AbstractServerTest.class );
     private static final List<LdifEntry> EMPTY_LIST = Collections.unmodifiableList( new ArrayList<LdifEntry>( 0 ) );
@@ -238,13 +239,10 @@
     /**
      * Get's the initial context factory for the provider's ou=system context
      * root.
-     *
-     * @see junit.framework.TestCase#setUp()
      */
+    @Before
     protected void setUp() throws Exception
     {
-        super.setUp();
-        
         if ( start == 0 )
         {
             t0 = System.currentTimeMillis();
@@ -378,13 +376,12 @@
 
     /**
      * Sets the system context root to null.
-     *
-     * @see junit.framework.TestCase#tearDown()
      */
+    @After
     protected void tearDown() throws Exception
     {
-        super.tearDown();
         ldapServer.stop();
+        
         try
         {
             directoryService.shutdown();

Modified: directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractResponseTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractResponseTest.java (original)
+++ directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractResponseTest.java Tue Sep  1 12:28:00 2009
@@ -21,11 +21,10 @@
 package org.apache.directory.shared.dsmlv2;
 
 
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.dsmlv2.Dsmlv2ResponseParser;
 import org.xmlpull.v1.XmlPullParserException;
-
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 /**
  * This class had to be used to create a Response TestCase
@@ -33,7 +32,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public abstract class AbstractResponseTest extends TestCase
+public abstract class AbstractResponseTest
 {
     /**
      * Asserts that parsing throws a correct XmlPullParserException due to an incorrect file
@@ -43,7 +42,7 @@
      * @param filename
      *      the path of the xml file to parse 
      */
-    public void testParsingFail( Class testClass, String filename )
+    public void testParsingFail( Class<?> testClass, String filename )
     {
         try
         {

Modified: directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java (original)
+++ directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java Tue Sep  1 12:28:00 2009
@@ -21,13 +21,10 @@
 package org.apache.directory.shared.dsmlv2;
 
 
-import java.io.FileInputStream;
-
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.dsmlv2.Dsmlv2Parser;
 import org.xmlpull.v1.XmlPullParserException;
-
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 /**
  * This class had to be used to create a Request TestCase
@@ -35,7 +32,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public abstract class AbstractTest extends TestCase
+public abstract class AbstractTest
 {
     /**
      * Asserts that parsing throws a correct XmlPullParserException due to an incorrect file
@@ -45,7 +42,7 @@
      * @param filename
      *      the path of the xml file to parse 
      */
-    public void testParsingFail( Class testClass, String filename )
+    public void testParsingFail( Class<?> testClass, String filename )
     {
         try
         {

Modified: directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AllTests.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AllTests.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AllTests.java (original)
+++ directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AllTests.java Tue Sep  1 12:28:00 2009
@@ -21,9 +21,6 @@
 package org.apache.directory.shared.dsmlv2;
 
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.apache.directory.shared.dsmlv2.abandonRequest.AbandonRequestTest;
 import org.apache.directory.shared.dsmlv2.addRequest.AddRequestTest;
 import org.apache.directory.shared.dsmlv2.addResponse.AddResponseTest;
@@ -47,6 +44,8 @@
 import org.apache.directory.shared.dsmlv2.searchResponse.searchResultDone.SearchResultDoneTest;
 import org.apache.directory.shared.dsmlv2.searchResponse.searchResultEntry.SearchResultEntryTest;
 import org.apache.directory.shared.dsmlv2.searchResponse.searchResultReference.SearchResultReferenceTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
 
 
 /**
@@ -55,42 +54,33 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    AbandonRequestTest.class,
+    AddRequestTest.class,
+    AddResponseTest.class,
+    AuthRequestTest.class,
+    AuthResponseTest.class,
+    BatchRequestTest.class,
+    BatchResponseTest.class,
+    CompareRequestTest.class,
+    CompareResponseTest.class,
+    DelRequestTest.class,
+    DelResponseTest.class,
+    ErrorResponseTest.class,
+    ExtendedRequestTest.class,
+    ExtendedResponseTest.class,
+    ModifyDNRequestTest.class,
+    ModifyDNResponseTest.class,
+    ModifyRequestTest.class,
+    ModifyResponseTest.class,
+    SearchRequestTest.class,
+    SearchResponseTest.class,
+    SearchResultDoneTest.class,
+    SearchResultEntryTest.class,
+    SearchResultReferenceTest.class
+})
+
 public class AllTests
 {
-    /**
-     * Lauches the Test Suite
-     * 
-     * @return
-     *      the test
-     */
-    public static Test suite()
-    {
-        TestSuite suite = new TestSuite( "Test for org.apache.directory.shared.dsmlv2.addRequest" );
-        //$JUnit-BEGIN$
-        suite.addTestSuite( AbandonRequestTest.class );
-        suite.addTestSuite( AddRequestTest.class );
-        suite.addTestSuite( AddResponseTest.class );
-        suite.addTestSuite( AuthRequestTest.class );
-        suite.addTestSuite( AuthResponseTest.class );
-        suite.addTestSuite( BatchRequestTest.class );
-        suite.addTestSuite( BatchResponseTest.class );
-        suite.addTestSuite( CompareRequestTest.class );
-        suite.addTestSuite( CompareResponseTest.class );
-        suite.addTestSuite( DelRequestTest.class );
-        suite.addTestSuite( DelResponseTest.class );
-        suite.addTestSuite( ErrorResponseTest.class );
-        suite.addTestSuite( ExtendedRequestTest.class );
-        suite.addTestSuite( ExtendedResponseTest.class );
-        suite.addTestSuite( ModifyDNRequestTest.class );
-        suite.addTestSuite( ModifyDNResponseTest.class );
-        suite.addTestSuite( ModifyRequestTest.class );
-        suite.addTestSuite( ModifyResponseTest.class );
-        suite.addTestSuite( SearchRequestTest.class );
-        suite.addTestSuite( SearchResponseTest.class );
-        suite.addTestSuite( SearchResultDoneTest.class );
-        suite.addTestSuite( SearchResultEntryTest.class );
-        suite.addTestSuite( SearchResultReferenceTest.class );
-        //$JUnit-END$
-        return suite;
-    }
 }

Modified: directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java (original)
+++ directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java Tue Sep  1 12:28:00 2009
@@ -26,7 +26,12 @@
 import org.apache.directory.shared.ldap.codec.ControlCodec;
 import org.apache.directory.shared.ldap.codec.abandon.AbandonRequestCodec;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.junit.Test;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertFalse;
 
 /**
  * Tests for the Abandon Request parsing
@@ -39,6 +44,7 @@
     /**
      * Test parsing of a request without the abandonID attribute
      */
+    @Test
     public void testRequestWithoutAbandonId()
     {
         testParsingFail( AbandonRequestTest.class, "request_without_abandonID_attribute.xml" );
@@ -48,6 +54,7 @@
     /**
      * Test parsing of a request with the abandonID attribute
      */
+    @Test
     public void testRequestWithAbandonId()
     {
         Dsmlv2Parser parser = null;
@@ -74,6 +81,7 @@
     /**
      * Test parsing of a request with the (optional) requestID attribute equals to 0
      */
+    @Test
     public void testRequestWithRequestIdEquals0()
     {
         testParsingFail( AbandonRequestTest.class, "request_with_requestID_equals_0.xml" );
@@ -83,6 +91,7 @@
     /**
      * Test parsing of a request with the (optional) requestID attribute
      */
+    @Test
     public void testRequestWithRequestId()
     {
         Dsmlv2Parser parser = null;
@@ -109,6 +118,7 @@
     /**
      * Test parsing of a request with a (optional) Control element
      */
+    @Test
     public void testRequestWith1Control()
     {
         Dsmlv2Parser parser = null;
@@ -140,6 +150,7 @@
     /**
      * Test parsing of a request with a (optional) Control element with Base64 value
      */
+    @Test
     public void testRequestWith1ControlBase64Value()
     {
         Dsmlv2Parser parser = null;
@@ -171,6 +182,7 @@
     /**
      * Test parsing of a request with a (optional) Control element with empty value
      */
+    @Test
     public void testRequestWith1ControlEmptyValue()
     {
         Dsmlv2Parser parser = null;
@@ -202,6 +214,7 @@
     /**
      * Test parsing of a request with 2 (optional) Control elements
      */
+    @Test
     public void testRequestWith2Controls()
     {
         Dsmlv2Parser parser = null;
@@ -233,6 +246,7 @@
     /**
      * Test parsing of a request with 3 (optional) Control elements without value
      */
+    @Test
     public void testRequestWith3ControlsWithoutValue()
     {
         Dsmlv2Parser parser = null;
@@ -266,6 +280,7 @@
      * 
      * DIRSTUDIO-1
      */
+    @Test
     public void testRequestWithNeededRequestId()
     {
         testParsingFail( AbandonRequestTest.class, "request_with_needed_requestID.xml" );

Modified: directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java (original)
+++ directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java Tue Sep  1 12:28:00 2009
@@ -31,7 +31,11 @@
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.util.StringTools;
-
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertFalse;
 
 /**
  * Tests for the Add Request parsing
@@ -44,6 +48,7 @@
     /**
      * Test parsing of a request without the dn attribute
      */
+    @Test
     public void testRequestWithoutDn()
     {
         testParsingFail( AddRequestTest.class, "request_without_dn_attribute.xml" );
@@ -53,6 +58,7 @@
     /**
      * Test parsing of a request with the dn attribute
      */
+    @Test
     public void testRequestWithDn()
     {
         Dsmlv2Parser parser = null;
@@ -78,6 +84,7 @@
     /**
      * Test parsing of a request with the (optional) requestID attribute
      */
+    @Test
     public void testRequestWithRequestId()
     {
         Dsmlv2Parser parser = null;
@@ -104,6 +111,7 @@
     /**
      * Test parsing of a request with the (optional) requestID attribute equals to 0
      */
+    @Test
     public void testRequestWithRequestIdEquals0()
     {
         testParsingFail( AddRequestTest.class, "request_with_requestID_equals_0.xml" );
@@ -113,6 +121,7 @@
     /**
      * Test parsing of a request with a (optional) Control element
      */
+    @Test
     public void testRequestWith1Control()
     {
         Dsmlv2Parser parser = null;
@@ -146,6 +155,7 @@
     /**
      * Test parsing of a request with a (optional) Control element with Base64 value
      */
+    @Test
     public void testRequestWith1ControlBase64Value()
     {
         Dsmlv2Parser parser = null;
@@ -176,6 +186,7 @@
     /**
      * Test parsing of a request with a (optional) Control element with empty value
      */
+    @Test
     public void testRequestWith1ControlEmptyValue()
     {
         Dsmlv2Parser parser = null;
@@ -206,6 +217,7 @@
     /**
      * Test parsing of a request with 2 (optional) Control elements
      */
+    @Test
     public void testRequestWith2Controls()
     {
         Dsmlv2Parser parser = null;
@@ -235,6 +247,7 @@
     /**
      * Test parsing of a request with 3 (optional) Control elements without value
      */
+    @Test
     public void testRequestWith3ControlsWithoutValue()
     {
         Dsmlv2Parser parser = null;
@@ -265,6 +278,7 @@
     /**
      * Test parsing of a request with an Attr elements with value
      */
+    @Test
     public void testRequestWith1AttrWithoutValue()
     {
         Dsmlv2Parser parser = null;
@@ -301,6 +315,7 @@
     /**
      * Test parsing of a request with an Attr elements with empty value
      */
+    @Test
     public void testRequestWith1AttrEmptyValue()
     {
         Dsmlv2Parser parser = null;
@@ -337,6 +352,7 @@
     /**
      * Test parsing of a request with an Attr elements with value
      */
+    @Test
     public void testRequestWith1AttrWithValue()
     {
         Dsmlv2Parser parser = null;
@@ -375,6 +391,7 @@
     /**
      * Test parsing of a request with an Attr elements with value
      */
+    @Test
     public void testRequestWith1AttrWithBase64Value()
     {
         Dsmlv2Parser parser = null;
@@ -414,6 +431,7 @@
     /**
      * Test parsing of a request with 2 Attr elements with value
      */
+    @Test
     public void testRequestWith2AttrWithValue()
     {
         Dsmlv2Parser parser = null;
@@ -456,6 +474,7 @@
     /**
      * Test parsing of a request with 1 Attr element without attribute value
      */
+    @Test
     public void testRequestWith1AttrWithoutNameAttribute()
     {
         testParsingFail( AddRequestTest.class, "request_with_1_attr_without_name_attribute.xml" );
@@ -465,6 +484,7 @@
     /**
      * Test parsing of a request with 1 Attr element with 2 Values
      */
+    @Test
     public void testRequestWith1AttrWith2Values()
     {
         Dsmlv2Parser parser = null;
@@ -509,6 +529,7 @@
      * 
      * DIRSTUDIO-1
      */
+    @Test
     public void testRequestWithNeededRequestId()
     {
         testParsingFail( AddRequestTest.class, "request_with_needed_requestID.xml" );

Modified: directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addResponse/AddResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addResponse/AddResponseTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addResponse/AddResponseTest.java (original)
+++ directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addResponse/AddResponseTest.java Tue Sep  1 12:28:00 2009
@@ -32,9 +32,16 @@
 import org.apache.directory.shared.ldap.codec.add.AddResponseCodec;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.junit.Test;
 
 import com.sun.jndi.ldap.LdapURL;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+
 
 /**
  * Tests for the Add Response parsing
@@ -48,6 +55,7 @@
     /**
      * Test parsing of a Response with the (optional) requestID attribute
      */
+    @Test
     public void testResponseWithRequestId()
     {
         Dsmlv2ResponseParser parser = null;
@@ -74,6 +82,7 @@
     /**
      * Test parsing of a Response with the (optional) requestID attribute equals 0
      */
+    @Test
     public void testResponseWithRequestIdEquals0()
     {
         testParsingFail( AddResponseTest.class, "response_with_requestID_equals_0.xml" );
@@ -83,6 +92,7 @@
     /**
      * Test parsing of a response with a (optional) Control element
      */
+    @Test
     public void testResponseWith1Control()
     {
         Dsmlv2ResponseParser parser = null;
@@ -116,6 +126,7 @@
     /**
      * Test parsing of a response with a (optional) Control element with emptyValue
      */
+    @Test
     public void testResponseWith1ControlEmptyValue()
     {
         Dsmlv2ResponseParser parser = null;
@@ -146,6 +157,7 @@
     /**
      * Test parsing of a response with 2 (optional) Control elements
      */
+    @Test
     public void testResponseWith2Controls()
     {
         Dsmlv2ResponseParser parser = null;
@@ -179,6 +191,7 @@
     /**
      * Test parsing of a response with 3 (optional) Control elements without value
      */
+    @Test
     public void testResponseWith3ControlsWithoutValue()
     {
         Dsmlv2ResponseParser parser = null;
@@ -213,6 +226,7 @@
     /**
      * Test parsing of a response without Result Code element
      */
+    @Test
     public void testResponseWithoutResultCode()
     {
         testParsingFail( AddResponseTest.class, "response_without_result_code.xml" );
@@ -222,6 +236,7 @@
     /**
      * Test parsing of a response with Result Code element but a not integer value
      */
+    @Test
     public void testResponseWithResultCodeNotInteger()
     {
         testParsingFail( AddResponseTest.class, "response_with_result_code_not_integer.xml" );
@@ -231,6 +246,7 @@
     /**
      * Test parsing of a response with Result Code 
      */
+    @Test
     public void testResponseWithResultCode()
     {
         Dsmlv2ResponseParser parser = null;
@@ -259,6 +275,7 @@
     /**
      * Test parsing of a response with Error Message
      */
+    @Test
     public void testResponseWithErrorMessage()
     {
         Dsmlv2ResponseParser parser = null;
@@ -288,6 +305,7 @@
     /**
      * Test parsing of a response with empty Error Message
      */
+    @Test
     public void testResponseWithEmptyErrorMessage()
     {
         Dsmlv2ResponseParser parser = null;
@@ -316,6 +334,7 @@
     /**
      * Test parsing of a response with a Referral
      */
+    @Test
     public void testResponseWith1Referral()
     {
         Dsmlv2ResponseParser parser = null;
@@ -336,7 +355,7 @@
 
         LdapResultCodec ldapResult = addResponse.getLdapResult();
 
-        List referrals = ldapResult.getReferrals();
+        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
 
         assertEquals( 1, referrals.size() );
 
@@ -356,6 +375,7 @@
     /**
      * Test parsing of a response with an empty Referral
      */
+    @Test
     public void testResponseWith1EmptyReferral()
     {
         Dsmlv2ResponseParser parser = null;
@@ -377,7 +397,7 @@
 
         LdapResultCodec ldapResult = addResponse.getLdapResult();
 
-        List referrals = ldapResult.getReferrals();
+        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
 
         assertEquals( 0, referrals.size() );
     }
@@ -386,6 +406,7 @@
     /**
      * Test parsing of a response with 2 Referral elements
      */
+    @Test
     public void testResponseWith2Referrals()
     {
         Dsmlv2ResponseParser parser = null;
@@ -407,7 +428,7 @@
 
         LdapResultCodec ldapResult = addResponse.getLdapResult();
 
-        List referrals = ldapResult.getReferrals();
+        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
 
         assertEquals( 2, referrals.size() );
 
@@ -438,6 +459,7 @@
     /**
      * Test parsing of a response with a Referral and an Error Message
      */
+    @Test
     public void testResponseWith1ReferralAndAnErrorMessage()
     {
         Dsmlv2ResponseParser parser = null;
@@ -459,7 +481,7 @@
 
         LdapResultCodec ldapResult = addResponse.getLdapResult();
 
-        List referrals = ldapResult.getReferrals();
+        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
 
         assertEquals( 1, referrals.size() );
 
@@ -479,6 +501,7 @@
     /**
      * Test parsing of a response with MatchedDN attribute
      */
+    @Test
     public void testResponseWithMatchedDNAttribute()
     {
         Dsmlv2ResponseParser parser = null;
@@ -507,6 +530,7 @@
     /**
      * Test parsing of a response with wrong matched DN
      */
+    @Test
     public void testResponseWithWrongMatchedDN()
     {
         testParsingFail( AddResponseTest.class, "response_with_wrong_matchedDN_attribute.xml" );
@@ -516,6 +540,7 @@
     /**
      * Test parsing of a response with wrong Descr attribute
      */
+    @Test
     public void testResponseWithWrongDescr()
     {
         testParsingFail( AddResponseTest.class, "response_with_wrong_descr.xml" );



Mime
View raw message