directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r753296 [1/2] - in /directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec: ./ abandon/ add/ bind/ compare/ controls/replication/ del/ intermediate/ modify/ modifyDn/ search/ search/controls/ ...
Date Fri, 13 Mar 2009 15:17:55 GMT
Author: elecharny
Date: Fri Mar 13 15:17:52 2009
New Revision: 753296

URL: http://svn.apache.org/viewvc?rev=753296&view=rev
Log:
Switched to JUnit 4.4

Modified:
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapDecoderTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddResponseTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncStateValueControlTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java Fri Mar 13 15:17:52 2009
@@ -28,14 +28,19 @@
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.abandon.AbandonRequest;
 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;
 
-import junit.framework.TestCase;
 
-public class LdapControlTest extends TestCase
+public class LdapControlTest
 {
     /**
      * Test the decoding of a Request with controls
      */
+	@Test
     public void testDecodeRequestWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -145,6 +150,7 @@
     /**
      * Test the decoding of a Request with null OID controls
      */
+	@Test
     public void testDecodeRequestWithControlsNullOID()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -188,6 +194,7 @@
     /**
      * Test the decoding of a Request with bad OID controls
      */
+	@Test
     public void testDecodeRequestWithControlsBadOID()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -231,6 +238,7 @@
     /**
      * Test the decoding of a Request with bad criticality
      */
+	@Test
     public void testDecodeRequestWithControlsBadCriticality()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapDecoderTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapDecoderTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapDecoderTest.java Fri Mar 13 15:17:52 2009
@@ -20,9 +20,6 @@
 package org.apache.directory.shared.ldap.codec;
 
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.ber.tlv.TLVStateEnum;
@@ -33,16 +30,20 @@
 import org.apache.directory.shared.ldap.codec.bind.BindRequest;
 import org.apache.directory.shared.ldap.codec.bind.SimpleAuthentication;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.junit.Test;
 
 import java.nio.ByteBuffer;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
 
 /**
  * A global Ldap Decoder test
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class LdapDecoderTest extends TestCase
+public class LdapDecoderTest
 {
     // ~ Methods
     // ------------------------------------------------------------------------------------
@@ -50,6 +51,7 @@
     /**
      * Test the decoding of a full PDU
      */
+    @Test
     public void testDecodeFull()
     {
 
@@ -102,6 +104,7 @@
     /**
      * Test the decoding of a partial PDU
      */
+    @Test
     public void testDecodePartial()
     {
 
@@ -133,7 +136,7 @@
             fail( de.getMessage() );
         }
 
-        Assert.assertEquals( TLVStateEnum.VALUE_STATE_PENDING, ldapMessageContainer.getState() );
+        assertEquals( TLVStateEnum.VALUE_STATE_PENDING, ldapMessageContainer.getState() );
 
         // Check the decoded PDU
         LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
@@ -149,6 +152,7 @@
     /**
      * Test the decoding of a splitted PDU
      */
+    @Test
     public void testDecodeSplittedPDU()
     {
 
@@ -224,6 +228,7 @@
      * Test the decoding of a PDU with a bad Length. The first TLV has a length
      * of 0x32 when the PDU is 0x33 bytes long.
      */
+    @Test
     public void testDecodeBadLengthTooSmall()
     {
 
@@ -270,6 +275,7 @@
      * Test the decoding of a PDU with a bad primitive Length. The second TLV
      * has a length of 0x02 when the PDU is 0x01 bytes long.
      */
+    @Test
     public void testDecodeBadPrimitiveLengthTooBig()
     {
 
@@ -316,6 +322,7 @@
      * Test the decoding of a PDU with a bad primitive Length. The second TLV
      * has a length of 0x02 when the PDU is 0x01 bytes long.
      */
+    @Test
     public void testDecodeBadTagTransition()
     {
 
@@ -362,6 +369,7 @@
      * The length is 3 bytes long, but the PDU has been splitted 
      * just after the first byte 
      */
+    @Test
     public void testDecodeSplittedLength()
     {
 

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java Fri Mar 13 15:17:52 2009
@@ -20,8 +20,6 @@
 package org.apache.directory.shared.ldap.codec;
 
 
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
@@ -30,15 +28,20 @@
 import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 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 java.nio.ByteBuffer;
 
+
 /**
  * A global Ldap Decoder test
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class LdapMessageTest extends TestCase
+public class LdapMessageTest
 {
     // ~ Methods
     // ------------------------------------------------------------------------------------
@@ -46,6 +49,7 @@
     /**
      * Test the decoding of null length messageId
      */
+    @Test
     public void testDecodeMessageLengthNull()
     {
 
@@ -80,6 +84,7 @@
     /**
      * Test the decoding of null length messageId
      */
+    @Test
     public void testDecodeMessageIdLengthNull()
     {
 
@@ -115,6 +120,7 @@
     /**
      * Test the decoding of null length messageId
      */
+    @Test
     public void testDecodeMessageIdMinusOne()
     {
 
@@ -150,6 +156,7 @@
     /**
      * Test the decoding of messageId which value is -1
      */
+    @Test
     public void testDecodeMessageIdMaxInt()
     {
 
@@ -186,6 +193,7 @@
     /**
      * Test the decoding of a message with a wrong protocol operation
      */
+    @Test
     public void testDecodeWrongProtocolOpMaxInt()
     {
 
@@ -269,6 +277,7 @@
     /**
      * Test the decoding of a LdapMessage with a large MessageId
      */
+    @Test
     public void testDecodeUnBindRequestNoControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java Fri Mar 13 15:17:52 2009
@@ -20,8 +20,6 @@
 package org.apache.directory.shared.ldap.codec;
 
 
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
@@ -33,6 +31,10 @@
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.LdapURL;
 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 java.nio.ByteBuffer;
 
@@ -43,7 +45,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class LdapResultTest extends TestCase
+public class LdapResultTest
 {
     // ~ Methods
     // ------------------------------------------------------------------------------------
@@ -51,6 +53,7 @@
     /**
      * Test the decoding of a AddResponse with no LdapResult
      */
+	@Test
     public void testDecodeAddResponseEmptyResultCode()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -87,7 +90,8 @@
     /**
      * Test the decoding of a AddResponse with no LdapResult
      */
-    public void testDecodeAddResponseEmptyResultCodeAbove90()
+	@Test
+	public void testDecodeAddResponseEmptyResultCodeAbove90()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
 
@@ -123,6 +127,7 @@
     /**
      * Test the decoding of a AddResponse with all the different result codes
      */
+	@Test
     public void testDecodeAddResponseEmptyResultCodesOK()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -167,6 +172,7 @@
     /**
      * Test the decoding of a AddResponse with no matched DN
      */
+	@Test
     public void testDecodeAddResponseEmptyResultCodeNoMatchedDN()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -203,6 +209,7 @@
     /**
      * Test the decoding of a AddResponse with no error message
      */
+	@Test
     public void testDecodeAddResponseEmptyResultCodeNoErrorMsg()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -240,6 +247,7 @@
     /**
      * Test the decoding of a AddResponse with a valid LdapResult
      */
+	@Test
     public void testDecodeAddResponseEmptyResultCodeOK()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -303,6 +311,7 @@
     /**
      * Test the decoding of a AddResponse with a valid LdapResult with referral
      */
+	@Test
     public void testDecodeAddResponseEmptyResultCodeOKReferral()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -372,6 +381,7 @@
     /**
      * Test the decoding of a AddResponse with a valid LdapResult with referrals
      */
+	@Test
     public void testDecodeAddResponseEmptyResultCodeOKReferrals()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -447,6 +457,7 @@
      * Test the decoding of a AddResponse with a valid LdapResult with referrals
      * and an empty referral
      */
+	@Test
     public void testDecodeAddResponseEmptyResultCodeEmptyReferral()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -521,6 +532,7 @@
      * Test the decoding of a AddResponse with a valid LdapResult and an invalid
      * transition after the referral sequence
      */
+	@Test
     public void testDecodeAddResponseEmptyResultCodeEmptyReferrals()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java Fri Mar 13 15:17:52 2009
@@ -33,8 +33,11 @@
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.abandon.AbandonRequest;
 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;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertFalse;
 
 
 /**
@@ -42,11 +45,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AbandonRequestTest extends TestCase
+public class AbandonRequestTest
 {
     /**
      * Test the decoding of a AbandonRequest with controls
      */
+	@Test
     public void testDecodeAbandonRequestWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -155,6 +159,7 @@
     /**
      * Test the decoding of a AbandonRequest with no controls
      */
+	@Test
     public void testDecodeAbandonRequestNoControlsHighMessageId()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -217,6 +222,7 @@
     /**
      * Test the decoding of a AbandonRequest with a null messageId
      */
+	@Test
     public void testDecodeAbandonRequestNoMessageId()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -252,6 +258,7 @@
     /**
      * Test the decoding of a AbandonRequest with a bad Message Id
      */
+	@Test
     public void testDecodeAbandonRequestBadMessageId()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java Fri Mar 13 15:17:52 2009
@@ -46,8 +46,10 @@
 import org.apache.directory.shared.ldap.message.Message;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 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;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -55,11 +57,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AddRequestTest extends TestCase
+public class AddRequestTest
 {
     /**
      * Test the decoding of a AddRequest
      */
+    @Test
     public void testDecodeAddRequestSuccess() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -173,6 +176,7 @@
     /**
      * Test the decoding of a AddRequest with a null body
      */
+    @Test
     public void testDecodeAddRequestNullBody()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -209,6 +213,7 @@
     /**
      * Test the decoding of a AddRequest with a null entry
      */
+    @Test
     public void testDecodeAddRequestNullEntry()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -267,6 +272,7 @@
     /**
      * Test the decoding of a AddRequest
      */
+    @Test
     public void testDecodeAddRequestbadDN()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -327,6 +333,7 @@
     /**
      * Test the decoding of a AddRequest with a null attributeList
      */
+    @Test
     public void testDecodeAddRequestNullAttributes()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -370,6 +377,7 @@
     /**
      * Test the decoding of a AddRequest with a empty attributeList
      */
+    @Test
     public void testDecodeAddRequestNullAttributeList()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -414,6 +422,7 @@
     /**
      * Test the decoding of a AddRequest with a empty attributeList
      */
+    @Test
     public void testDecodeAddRequestNullType()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -462,6 +471,7 @@
     /**
      * Test the decoding of a AddRequest with a empty attributeList
      */
+    @Test
     public void testDecodeAddRequestNoVals()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -507,6 +517,7 @@
     /**
      * Test the decoding of a AddRequest with a empty attributeList
      */
+    @Test
     public void testDecodeAddRequestNullVals()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -553,6 +564,7 @@
     /**
      * Test the decoding of a AddRequest with a empty attributeList
      */
+    @Test
     public void testDecodeAddRequestEmptyAttributeValue() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -638,6 +650,7 @@
      * Test the decoding of a AddRequest with a empty attributeList and a
      * control
      */
+    @Test
     public void testDecodeAddRequestEmptyAttributeValueWithControl() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddResponseTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddResponseTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddResponseTest.java Fri Mar 13 15:17:52 2009
@@ -34,18 +34,21 @@
 import org.apache.directory.shared.ldap.codec.add.AddResponse;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 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;
+import static org.junit.Assert.fail;
 
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AddResponseTest extends TestCase
+public class AddResponseTest
 {
     /**
      * Test the decoding of a AddResponse
      */
+    @Test
     public void testDecodeAddResponseSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -115,6 +118,7 @@
     /**
      * Test the decoding of a AddResponse with no LdapResult
      */
+    @Test
     public void testDecodeAddResponseEmptyResult()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -150,6 +154,7 @@
     /**
      * Test the decoding of a AddResponse with a control
      */
+    @Test
     public void testDecodeAddResponseSuccessWithControl()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -161,17 +166,17 @@
                 0x02, 0x01, 0x01, // messageID MessageID
                 0x69, 0x07, // CHOICE { ..., addResponse AddResponse, ...
                 // AddResponse ::= [APPLICATION 9] LDAPResult
-                0x0A, 0x01, 0x00,// LDAPResult ::= SEQUENCE {
+                  0x0A, 0x01, 0x00,// LDAPResult ::= SEQUENCE {
                 // resultCode ENUMERATED {
                 // success (0), ...
                 // },
-                0x04, 0x00, // matchedDN LDAPDN,
-                0x04, 0x00, // errorMessage LDAPString,
+                  0x04, 0x00, // matchedDN LDAPDN,
+                  0x04, 0x00, // errorMessage LDAPString,
                 // referral [3] Referral OPTIONAL }
                 // }
                 ( byte ) 0xA0, 0x1B, // A control
-                0x30, 0x19, 0x04, 0x17, 0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 0x2E, 0x31, 0x2E, 0x31, 0x31,
-                0x33, 0x37, 0x33, 0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32 } );
+                  0x30, 0x19, 0x04, 0x17, 0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 0x2E, 0x31, 0x2E, 0x31, 0x31,
+                  0x33, 0x37, 0x33, 0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32 } );
 
         String decodedPdu = StringTools.dumpBytes( stream.array() );
         stream.flip();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java Fri Mar 13 15:17:52 2009
@@ -35,19 +35,22 @@
 import org.apache.directory.shared.ldap.codec.bind.SimpleAuthentication;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.junit.Test;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
 
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class BindRequestPerfTest extends TestCase
+public class BindRequestPerfTest
 {
     /**
      * Test the decoding of a BindRequest with Simple authentication and no
      * controls
      */
+    @Test
     public void testDecodeBindRequestSimpleNoControlsPerf()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -147,6 +150,7 @@
      * Test the decoding of a BindRequest with Simple authentication and no
      * controls
      */
+    @Test
     public void testEncodeBindRequestPerf() throws Exception
     {
         LdapDN name = new LdapDN( "uid=akarasulu,dc=example,dc=com" );

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java Fri Mar 13 15:17:52 2009
@@ -39,20 +39,24 @@
 import org.apache.directory.shared.ldap.message.Message;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.junit.Test;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class BindRequestTest extends TestCase
+public class BindRequestTest
 {
     /**
      * Test the decoding of a BindRequest with Simple authentication and no
      * controls
      */
     /* Not used in unit tests
+    @Test
     public void testDecodeBindRequestSimpleNoControlsPerf()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -150,6 +154,7 @@
      * Test the decoding of a BindRequest with Simple authentication and
      * controls
      */
+    @Test
     public void testDecodeBindRequestSimpleWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -222,6 +227,7 @@
      * Test the decoding of a BindRequest with Simple authentication and
      * controls
      */
+    @Test
     public void testDecodeBindRequestBadDN()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -270,6 +276,7 @@
      * Test the decoding of a BindRequest with Simple authentication, no name
      * and no controls
      */
+    @Test
     public void testDecodeBindRequestSimpleNoName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -312,6 +319,7 @@
      * Test the decoding of a BindRequest with Simple authentication, empty name
      * (an anonymous bind) and no controls
      */
+    @Test
     public void testDecodeBindRequestSimpleEmptyName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -384,6 +392,7 @@
      * Test the decoding of a BindRequest with Sasl authentication, no
      * credentials and no controls
      */
+    @Test
     public void testDecodeBindRequestSaslNoCredsNoControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -460,6 +469,7 @@
      * Test the decoding of a BindRequest with Sasl authentication, a
      * credentials and no controls
      */
+    @Test
     public void testDecodeBindRequestSaslCredsNoControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -545,6 +555,7 @@
      * Test the decoding of a BindRequest with Sasl authentication, no name, a
      * credentials and no controls
      */
+    @Test
     public void testDecodeBindRequestSaslNoNameCredsNoControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -627,6 +638,7 @@
     /**
      * Test the decoding of a BindRequest with an empty body
      */
+    @Test
     public void testDecodeBindRequestEmptyBody()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -662,6 +674,7 @@
     /**
      * Test the decoding of a BindRequest with an empty version
      */
+    @Test
     public void testDecodeBindRequestEmptyVersion()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -698,6 +711,7 @@
     /**
      * Test the decoding of a BindRequest with a bad version (0)
      */
+    @Test
     public void testDecodeBindRequestBadVersion0()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -734,6 +748,7 @@
     /**
      * Test the decoding of a BindRequest with a bad version (4)
      */
+    @Test
     public void testDecodeBindRequestBadVersion4()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -770,6 +785,7 @@
     /**
      * Test the decoding of a BindRequest with a bad version (128)
      */
+    @Test
     public void testDecodeBindRequestBadVersion128()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -807,6 +823,7 @@
     /**
      * Test the decoding of a BindRequest with no name
      */
+    @Test
     public void testDecodeBindRequestNoName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -843,6 +860,7 @@
     /**
      * Test the decoding of a BindRequest with an empty name
      */
+    @Test
     public void testDecodeBindRequestEmptyName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -879,6 +897,7 @@
     /**
      * Test the decoding of a BindRequest with an empty simple
      */
+    @Test
     public void testDecodeBindRequestEmptysimple()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -942,6 +961,7 @@
     /**
      * Test the decoding of a BindRequest with an empty sasl
      */
+    @Test
     public void testDecodeBindRequestEmptySasl()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -983,6 +1003,7 @@
     /**
      * Test the decoding of a BindRequest with an empty mechanism
      */
+    @Test
     public void testDecodeBindRequestEmptyMechanism()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1050,6 +1071,7 @@
      * Test the decoding of a BindRequest with an bad mechanism
      */
     /* This test is not valid. I don't know how to generate a UnsupportedEncodingException ...
+    @Test
     public void testDecodeBindRequestBadMechanism()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1092,6 +1114,7 @@
     /**
      * Test the decoding of a BindRequest with an empty credentials
      */
+    @Test
     public void testDecodeBindRequestEmptyCredentials()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1160,6 +1183,7 @@
      * Test the decoding of a BindRequest with an empty credentials with
      * controls
      */
+    @Test
     public void testDecodeBindRequestEmptyCredentialsWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1240,6 +1264,7 @@
     /**
      * Test the decoding of a BindRequest with an empty mechanisms with controls
      */
+    @Test
     public void testDecodeBindRequestEmptyMechanismWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1320,6 +1345,7 @@
      * controls
      */
     /* No used by unit tests
+    @Test
     public void testPerf() throws Exception
     {
         LdapDN name = new LdapDN( "uid=akarasulu,dc=example,dc=com" );

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java Fri Mar 13 15:17:52 2009
@@ -35,20 +35,23 @@
 import org.apache.directory.shared.ldap.codec.bind.BindResponse;
 import org.apache.directory.shared.ldap.codec.search.controls.pagedSearch.PagedSearchControlCodec;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.message.control.PagedSearchControl;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.junit.Test;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class BindResponseTest extends TestCase
+public class BindResponseTest
 {
     /**
      * Test the decoding of a BindResponse
      */
+    @Test
     public void testDecodeBindResponseSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -120,6 +123,7 @@
     /**
      * Test the decoding of a BindResponse with a control
      */
+    @Test
     public void testDecodeBindResponseWithControlSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -217,6 +221,7 @@
     /**
      * Test the decoding of a BindResponse with an empty credentials
      */
+    @Test
     public void testDecodeBindResponseServerSASLEmptyCredentials()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -291,6 +296,7 @@
      * Test the decoding of a BindResponse with an empty credentials with
      * controls
      */
+    @Test
     public void testDecodeBindResponseServerSASLEmptyCredentialsWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -375,6 +381,7 @@
     /**
      * Test the decoding of a BindResponse with a credentials
      */
+    @Test
     public void testDecodeBindResponseServerSASL()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -448,6 +455,7 @@
     /**
      * Test the decoding of a BindResponse with no LdapResult
      */
+    @Test
     public void testDecodeAddResponseEmptyResult()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java Fri Mar 13 15:17:52 2009
@@ -37,8 +37,10 @@
 import org.apache.directory.shared.ldap.message.Message;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 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;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -46,12 +48,13 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CompareRequestTest extends TestCase
+public class CompareRequestTest
 {
 
     /**
      * Test the decoding of a full CompareRequest
      */
+    @Test
     public void testDecodeCompareRequestSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -125,6 +128,7 @@
     /**
      * Test the decoding of an empty CompareRequest
      */
+    @Test
     public void testDecodeCompareRequestEmptyRequest()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -160,6 +164,7 @@
     /**
      * Test the decoding of an empty entry CompareRequest
      */
+    @Test
     public void testDecodeCompareRequestEmptyEntry()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -202,6 +207,7 @@
     /**
      * Test the decoding of an empty ava
      */
+    @Test
     public void testDecodeCompareRequestEmptyAVA()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -242,6 +248,7 @@
     /**
      * Test the decoding of an empty ava
      */
+    @Test
     public void testDecodeCompareRequestInvalidDN()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -287,6 +294,7 @@
     /**
      * Test the decoding of an empty attributeDesc ava
      */
+    @Test
     public void testDecodeCompareRequestEmptyAttributeDesc()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -333,6 +341,7 @@
     /**
      * Test the decoding of an empty attributeValue ava
      */
+    @Test
     public void testDecodeCompareRequestEmptyAttributeValue()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -406,6 +415,7 @@
     /**
      * Test the decoding of an compare request with controls
      */
+    @Test
     public void testDecodeCompareRequestWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java Fri Mar 13 15:17:52 2009
@@ -34,8 +34,10 @@
 import org.apache.directory.shared.ldap.codec.compare.CompareResponse;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 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;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -43,11 +45,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CompareResponseTest extends TestCase
+public class CompareResponseTest
 {
     /**
      * Test the decoding of a CompareResponse
      */
+    @Test
     public void testDecodeCompareResponseSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -119,6 +122,7 @@
     /**
      * Test the decoding of a CompareResponse with controls
      */
+    @Test
     public void testDecodeCompareResponseSuccessWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -201,6 +205,7 @@
     /**
      * Test the decoding of a CompareResponse with no LdapResult
      */
+    @Test
     public void testDecodeCompareResponseEmptyResult()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncStateValueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncStateValueControlTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncStateValueControlTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncStateValueControlTest.java Fri Mar 13 15:17:52 2009
@@ -35,7 +35,6 @@
 import org.apache.directory.shared.ldap.codec.controls.replication.syncStateValue.SyncStateValueControlContainer;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncStateValue.SyncStateValueControlDecoder;
 import org.apache.directory.shared.ldap.message.control.replication.SyncStateTypeEnum;
-import org.apache.directory.shared.ldap.message.control.replication.SynchronizationModeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Test;
 

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java Fri Mar 13 15:17:52 2009
@@ -37,8 +37,10 @@
 import org.apache.directory.shared.ldap.message.Message;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 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;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -46,11 +48,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DelRequestTest extends TestCase
+public class DelRequestTest
 {
     /**
      * Test the decoding of a full DelRequest
      */
+    @Test
     public void testDecodeDelRequestSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -114,6 +117,7 @@
     /**
      * Test the decoding of a full DelRequest
      */
+    @Test
     public void testDecodeDelRequestBadDN()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -156,6 +160,7 @@
     /**
      * Test the decoding of an empty DelRequest
      */
+    @Test
     public void testDecodeDelRequestEmpty()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -192,6 +197,7 @@
     /**
      * Test the decoding of a full DelRequest with controls
      */
+    @Test
     public void testDecodeDelRequestSuccessWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java Fri Mar 13 15:17:52 2009
@@ -34,8 +34,10 @@
 import org.apache.directory.shared.ldap.codec.del.DelResponse;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 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;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -43,11 +45,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DelResponseTest extends TestCase
+public class DelResponseTest
 {
     /**
      * Test the decoding of a DelResponse
      */
+    @Test
     public void testDecodeDelResponseSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -120,6 +123,7 @@
     /**
      * Test the decoding of a DelResponse with no LdapResult
      */
+    @Test
     public void testDecodeDelResponseEmptyResult()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -155,6 +159,7 @@
     /**
      * Test the decoding of a DelResponse with controls
      */
+    @Test
     public void testDecodeDelResponseSuccessWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseTest.java Fri Mar 13 15:17:52 2009
@@ -32,8 +32,10 @@
 import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 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;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -41,11 +43,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class IntermediateResponseTest extends TestCase
+public class IntermediateResponseTest
 {
     /**
      * Test the decoding of a full IntermediateResponse
      */
+    @Test
     public void testDecodeIntermediateResponseSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -112,6 +115,7 @@
     /**
      * Test the decoding of a full IntermediateResponse with controls
      */
+    @Test
     public void testDecodeIntermediateResponseWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -193,6 +197,7 @@
      * Test the decoding of a full IntermediateResponse with no value and with
      * controls
      */
+    @Test
     public void testDecodeIntermediateResponseNoValueWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -273,6 +278,7 @@
     /**
      * Test the decoding of an empty IntermediateResponse
      */
+    @Test
     public void testDecodeIntermediateResponseEmpty()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -308,6 +314,7 @@
     /**
      * Test the decoding of an empty OID
      */
+    @Test
     public void testDecodeEmptyOID()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -343,6 +350,7 @@
     /**
      * Test the decoding of a bad name 
      */
+    @Test
     public void testDecodeExtendedBadRequestName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -380,6 +388,7 @@
     /**
      * Test the decoding of a name only IntermediateResponse
      */
+    @Test
     public void testDecodeIntermediateResponseName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -444,6 +453,7 @@
     /**
      * Test the decoding of an empty value IntermediateResponse
      */
+    @Test
     public void testDecodeIntermediateResponseEmptyValue()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -510,6 +520,7 @@
     /**
      * Test the decoding of an IntermediateResponse without name
      */
+    @Test
     public void testDecodeIntermediateResponseNoName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -574,6 +585,7 @@
     /**
      * Test the decoding of an IntermediateResponse with no value
      */
+    @Test
     public void testDecodeIntermediateResponseNoValue()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java Fri Mar 13 15:17:52 2009
@@ -41,8 +41,10 @@
 import org.apache.directory.shared.ldap.message.ModifyResponseImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 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;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -50,11 +52,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyRequestTest extends TestCase
+public class ModifyRequestTest
 {
     /**
      * Test the decoding of a ModifyRequest
      */
+    @Test
     public void testDecodeModifyRequest2AttrsSuccess() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -162,6 +165,7 @@
     /**
      * Test the decoding of a ModifyRequest
      */
+    @Test
     public void testDecodeModifyRequestBadDN()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -228,6 +232,7 @@
     /**
      * Test the decoding of a ModifyRequest, with different operations
      */
+    @Test
     public void testDecodeModifyRequestManyOperations() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -345,6 +350,7 @@
     /**
      * Test the decoding of a ModifyRequest, with different operations, take 2
      */
+    @Test
     public void testDecodeModifyRequestManyOperations2() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -477,6 +483,7 @@
     /**
      * Test the decoding of a ModifyRequest
      */
+    @Test
     public void testDecodeModifyRequest2Attrs3valsSuccess() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -590,6 +597,7 @@
     /**
      * Test the decoding of a ModifyRequest with an empty body
      */
+    @Test
     public void testDecodeModifyRequestEmptyBody()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -624,6 +632,7 @@
     /**
      * Test the decoding of a ModifyRequest with an empty object
      */
+    @Test
     public void testDecodeModifyRequestEmptyObject()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -659,6 +668,7 @@
     /**
      * Test the decoding of a ModifyRequest with an object and nothing else
      */
+    @Test
     public void testDecodeModifyRequestObjectAlone()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -696,6 +706,7 @@
     /**
      * Test the decoding of a ModifyRequest with an empty modification
      */
+    @Test
     public void testDecodeModifyRequestEmptyModification()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -734,6 +745,7 @@
     /**
      * Test the decoding of a ModifyRequest with an empty operation
      */
+    @Test
     public void testDecodeModifyRequestEmptyOperation()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -773,6 +785,7 @@
     /**
      * Test the decoding of a ModifyRequest with an wrong empty operation
      */
+    @Test
     public void testDecodeModifyRequestWrongOperationEmpty()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -813,6 +826,7 @@
     /**
      * Test the decoding of a ModifyRequest with an wrong operation
      */
+    @Test
     public void testDecodeModifyRequestWrongOperation()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -854,6 +868,7 @@
      * Test the decoding of a ModifyRequest with an add operation, and nothing
      * more
      */
+    @Test
     public void testDecodeModifyRequestAddOperationEnd()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -895,6 +910,7 @@
      * Test the decoding of a ModifyRequest with an add operation, and an empty
      * modification
      */
+    @Test
     public void testDecodeModifyRequestAddOperationEmptyModification()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -937,6 +953,7 @@
      * Test the decoding of a ModifyRequest with an add operation, and a
      * modification with an empty type
      */
+    @Test
     public void testDecodeModifyRequestAddOperationModificationEmptyType()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -984,6 +1001,7 @@
      * Test the decoding of a ModifyRequest with an add operation, and a
      * modification with a type and no vals
      */
+    @Test
     public void testDecodeModifyRequestAddOperationModificationTypeNoVals()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1027,6 +1045,7 @@
      * Test the decoding of a ModifyRequest with an add operation, and a
      * modification with a type and an empty vals
      */
+    @Test
     public void testDecodeModifyRequestAddOperationModificationTypeEmptyVals()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1107,6 +1126,7 @@
      * Test the decoding of a ModifyRequest with an add operation, and a
      * modification with a type and an empty vals wuth controls
      */
+    @Test
     public void testDecodeModifyRequestAddOperationModificationTypeEmptyValsWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1199,6 +1219,7 @@
      * Test the decoding of a ModifyRequest with an add operation, and a
      * modification with a type and two vals
      */
+    @Test
     public void testDecodeModifyRequestAddOperationModificationType2Vals() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseTest.java Fri Mar 13 15:17:52 2009
@@ -34,8 +34,10 @@
 import org.apache.directory.shared.ldap.codec.modify.ModifyResponse;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 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;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -43,11 +45,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyResponseTest extends TestCase
+public class ModifyResponseTest
 {
     /**
      * Test the decoding of a ModifyResponse
      */
+    @Test
     public void testDecodeModifyResponseSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -118,6 +121,7 @@
     /**
      * Test the decoding of a ModifyResponse with controls
      */
+    @Test
     public void testDecodeModifyResponseSuccessWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -199,6 +203,7 @@
     /**
      * Test the decoding of a ModifyResponse with no LdapResult
      */
+    @Test
     public void testDecodeModifyResponseEmptyResult()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java Fri Mar 13 15:17:52 2009
@@ -37,8 +37,10 @@
 import org.apache.directory.shared.ldap.message.ModifyDnResponseImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 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;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -46,11 +48,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyDNRequestTest extends TestCase
+public class ModifyDNRequestTest
 {
     /**
      * Test the decoding of a full ModifyDNRequest
      */
+    @Test
     public void testDecodeModifyDNRequestSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -124,6 +127,7 @@
     /**
      * Test the decoding of a bad DN ModifyDNRequest
      */
+    @Test
     public void testDecodeModifyDNRequestBadDN()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -174,6 +178,7 @@
     /**
      * Test the decoding of a bad RDN ModifyDNRequest
      */
+    @Test
     public void testDecodeModifyDNRequestBadRDN()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -224,6 +229,7 @@
     /**
      * Test the decoding of a bad RDN ModifyDNRequest
      */
+    @Test
     public void testDecodeModifyDNRequestBadNewSuperior()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -274,6 +280,7 @@
     /**
      * Test the decoding of a full ModifyDNRequest with controls
      */
+    @Test
     public void testDecodeModifyDNRequestSuccessWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -360,6 +367,7 @@
     /**
      * Test the decoding of a ModifyDNRequest without a superior
      */
+    @Test
     public void testDecodeModifyDNRequestWithoutSuperior()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -431,6 +439,7 @@
     /**
      * Test the decoding of a ModifyDNRequest without a superior with controls
      */
+    @Test
     public void testDecodeModifyDNRequestWithoutSuperiorWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -516,6 +525,7 @@
     /**
      * Test the decoding of a ModifyDNRequest with an empty body
      */
+    @Test
     public void testDecodeModifyDNRequestEmptyBody()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -551,6 +561,7 @@
     /**
      * Test the decoding of a ModifyDNRequest with an empty entry
      */
+    @Test
     public void testDecodeModifyDNRequestEmptyEntry()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -586,6 +597,7 @@
     /**
      * Test the decoding of a ModifyDNRequest with an empty newRdn
      */
+    @Test
     public void testDecodeModifyDNRequestEmptyNewRdn()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -625,6 +637,7 @@
     /**
      * Test the decoding of a ModifyDNRequest with an empty deleteOldRdn
      */
+    @Test
     public void testDecodeModifyDNRequestEmptyDeleteOldRdnn()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java Fri Mar 13 15:17:52 2009
@@ -34,8 +34,10 @@
 import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponse;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 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;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -43,11 +45,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyDNResponseTest extends TestCase
+public class ModifyDNResponseTest
 {
     /**
      * Test the decoding of a ModifyDNResponse
      */
+    @Test
     public void testDecodeModifyResponseSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -119,6 +122,7 @@
     /**
      * Test the decoding of a ModifyDNResponse with controls
      */
+    @Test
     public void testDecodeModifyResponseSuccessWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -201,6 +205,7 @@
     /**
      * Test the decoding of a ModifyDNResponse with no LdapResult
      */
+    @Test
     public void testDecodeModifyDNResponseEmptyResult()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java Fri Mar 13 15:17:52 2009
@@ -42,8 +42,12 @@
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.BeforeClass;
 import org.junit.Test;
-
-import junit.framework.TestCase;
+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.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 
 /**
@@ -51,15 +55,13 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SearchRequestMatchingRuleAssertionTest extends TestCase
+public class SearchRequestMatchingRuleAssertionTest
 {
     static Map<String, OidNormalizer> oids = new HashMap<String, OidNormalizer>();
 
     @BeforeClass
-    protected void setUp() throws Exception
+    public static void setUp() throws Exception
     {
-        super.setUp();
-
         oids.put( "dc", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer() ) );
         oids.put( "domaincomponent", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer() ) );
         oids.put( "0.9.2342.19200300.100.1.25", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer() ) );

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java Fri Mar 13 15:17:52 2009
@@ -41,8 +41,12 @@
 import org.apache.directory.shared.ldap.schema.normalizers.DeepTrimToLowerNormalizer;
 import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
 import org.apache.directory.shared.ldap.util.StringTools;
-
-import junit.framework.TestCase;
+import org.junit.BeforeClass;
+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.assertNotNull;
 
 
 /**
@@ -50,14 +54,13 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SearchRequestSubstringTest extends TestCase
+public class SearchRequestSubstringTest
 {
     static Map<String, OidNormalizer> oids = new HashMap<String, OidNormalizer>();
 
-    protected void setUp() throws Exception
+    @BeforeClass
+    public static void setUp() throws Exception
     {
-        super.setUp();
-
         oids.put( "dc", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer() ) );
         oids.put( "domaincomponent", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer() ) );
         oids.put( "0.9.2342.19200300.100.1.25", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer() ) );
@@ -73,6 +76,7 @@
      * Test the decoding of a SearchRequest with a substring filter. Test the
      * initial filter : (objectclass=t*)
      */
+    @Test
     public void testDecodeSearchRequestSubstringInitialAny()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -189,6 +193,7 @@
      * Test the decoding of a SearchRequest with a substring filter. Test the
      * initial filter : (objectclass=t*) With controls
      */
+    @Test
     public void testDecodeSearchRequestSubstringInitialAnyWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -314,6 +319,7 @@
      * Test the decoding of a SearchRequest with a substring filter. Test the
      * any filter : (objectclass=*t*)
      */
+    @Test
     public void testDecodeSearchRequestSubstringAny()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -430,6 +436,7 @@
      * Test the decoding of a SearchRequest with a substring filter. Test the
      * initial filter : (objectclass=*t*t)
      */
+    @Test
     public void testDecodeSearchRequestSubstringAnyFinal()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -547,6 +554,7 @@
      * Test the decoding of a SearchRequest with a substring filter. Test the
      * initial filter : (objectclass=t*t*t)
      */
+    @Test
     public void testDecodeSearchRequestSubstringInitialAnyFinal()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -665,6 +673,7 @@
      * Test the decoding of a SearchRequest with a substring filter. Test the
      * initial filter : (objectclass=t*t*)
      */
+    @Test
     public void testDecodeSearchRequestSubstringInitialAnyAnyFinal()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -781,6 +790,7 @@
      * Test the decoding of a SearchRequest with a substring filter. Test the
      * initial filter : (objectclass=t*t*t)
      */
+    @Test
     public void testDecodeSearchRequestSubstringAnyAnyFinal()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -894,6 +904,7 @@
      * Test the decoding of a SearchRequest with a substring filter. Test the
      * initial filter : (objectclass=t*)
      */
+    @Test
     public void testDecodeSearchRequestSubstringInitialAnyAny()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1010,6 +1021,7 @@
      * Test the decoding of a SearchRequest with a substring filter. Test the
      * initial filter : (objectclass=*t*t*t*)
      */
+    @Test
     public void testDecodeSearchRequestSubstringAnyAnyAny()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1130,6 +1142,7 @@
      * Test the decoding of a SearchRequest with a substring filter. Test the
      * initial filter : (objectclass=*t*t*t*)
      */
+    @Test
     public void testDecodeSearchRequestSubstringFinal()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1246,6 +1259,7 @@
     /**
      * Test the decoding of a SearchRequest with an empty Substring filter
      */
+    @Test
     public void testDecodeSearchRequestEmptySubstringFilter()
     {
         byte[] asn1BER = new byte[]
@@ -1294,6 +1308,7 @@
      * Test the decoding of a SearchRequest with a Substring filter and an empty
      * Substring
      */
+    @Test
     public void testDecodeSearchRequestSubstringFilterEmptyType()
     {
         byte[] asn1BER = new byte[]
@@ -1343,6 +1358,7 @@
      * Test the decoding of a SearchRequest with a Substring filter and an empty
      * Substring
      */
+    @Test
     public void testDecodeSearchRequestSubstringFilterNoSubstrings()
     {
         byte[] asn1BER = new byte[]
@@ -1392,6 +1408,7 @@
      * Test the decoding of a SearchRequest with a Substring filter and an empty
      * Substring
      */
+    @Test
     public void testDecodeSearchRequestSubstringFilterEmptySubstrings()
     {
         byte[] asn1BER = new byte[]
@@ -1442,6 +1459,7 @@
      * Test the decoding of a SearchRequest with a Substring filter and an empty
      * Substring Initial
      */
+    @Test
     public void testDecodeSearchRequestSubstringFilterEmptyInitial()
     {
         byte[] asn1BER = new byte[]
@@ -1493,6 +1511,7 @@
      * Test the decoding of a SearchRequest with a Substring filter and an empty
      * Substring Any
      */
+    @Test
     public void testDecodeSearchRequestSubstringFilterEmptyAny()
     {
         byte[] asn1BER = new byte[]
@@ -1544,6 +1563,7 @@
      * Test the decoding of a SearchRequest with a Substring filter and an empty
      * Substring Initial
      */
+    @Test
     public void testDecodeSearchRequestSubstringFilterEmptyFinal()
     {
         byte[] asn1BER = new byte[]
@@ -1595,6 +1615,7 @@
      * Test the decoding of a SearchRequest with a Substring filter Any before
      * initial
      */
+    @Test
     public void testDecodeSearchRequestSubstringFilterAnyInitial()
     {
         byte[] asn1BER = new byte[]
@@ -1638,6 +1659,7 @@
      * Test the decoding of a SearchRequest with a Substring filter Final before
      * initial
      */
+    @Test
     public void testDecodeSearchRequestSubstringFilterFinalInitial()
     {
         byte[] asn1BER = new byte[]
@@ -1681,6 +1703,7 @@
      * Test the decoding of a SearchRequest with a Substring filter Final before
      * any
      */
+    @Test
     public void testDecodeSearchRequestSubstringFilterFinalAny()
     {
         byte[] asn1BER = new byte[]
@@ -1723,6 +1746,7 @@
     /**
      * Test the decoding of a SearchRequest with a Substring filter Two initials
      */
+    @Test
     public void testDecodeSearchRequestSubstringFilterTwoInitials()
     {
         byte[] asn1BER = new byte[]
@@ -1765,6 +1789,7 @@
     /**
      * Test the decoding of a SearchRequest with a Substring filter Two finals
      */
+    @Test
     public void testDecodeSearchRequestSubstringFilterTwoFinals()
     {
         byte[] asn1BER = new byte[]

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java Fri Mar 13 15:17:52 2009
@@ -34,8 +34,10 @@
 import org.apache.directory.shared.ldap.codec.search.SearchResultDone;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 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;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -43,12 +45,13 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SearchResultDoneTest extends TestCase
+public class SearchResultDoneTest
 {
 
     /**
      * Test the decoding of a SearchResultDone
      */
+    @Test
     public void testDecodeSearchResultDoneSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -117,6 +120,7 @@
     /**
      * Test the decoding of a SearchResultDone with controls
      */
+    @Test
     public void testDecodeSearchResultDoneSuccessWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -198,6 +202,7 @@
     /**
      * Test the decoding of a SearchResultDone with no LdapResult
      */
+    @Test
     public void testDecodeSearchResultDoneEmptyResult()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java Fri Mar 13 15:17:52 2009
@@ -37,8 +37,10 @@
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 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;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -46,11 +48,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SearchResultEntryTest extends TestCase
+public class SearchResultEntryTest
 {
     /**
      * Test the decoding of a SearchResultEntry
      */
+    @Test
     public void testDecodeSearchResultEntrySuccess() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -139,6 +142,7 @@
     /**
      * Test the decoding of a SearchResultEntry
      */
+    @Test
     public void testDecodeSearchResultEntry2AttrsSuccess() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -236,6 +240,7 @@
      * Test the decoding of a SearchResultEntry with more bytes to be decoded at
      * the end
      */
+    @Test
     public void testDecodeSearchResultEntrySuccessWithFollowingMessage() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -345,6 +350,7 @@
     /**
      * Test the decoding of an empty SearchResultEntry
      */
+    @Test
     public void testDecodeSearchResultEntryEmpty()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -382,6 +388,7 @@
     /**
      * Test the decoding of an SearchResultEntry with an empty object name
      */
+    @Test
     public void testDecodeSearchResultEntryEmptyObjectName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -421,6 +428,7 @@
     /**
      * Test the decoding of an SearchResultEntry with an object name alone
      */
+    @Test
     public void testDecodeSearchResultEntryObjectNameAlone()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -461,6 +469,7 @@
     /**
      * Test the decoding of an SearchResultEntry with an empty attributes
      */
+    @Test
     public void testDecodeSearchResultEntryEmptyAttributes()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -529,6 +538,7 @@
     /**
      * Test the decoding of an SearchResultEntry with an empty attributes list
      */
+    @Test
     public void testDecodeSearchResultEntryEmptyAttributeList()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -571,6 +581,7 @@
      * Test the decoding of an SearchResultEntry with an empty attributes list
      * with controls
      */
+    @Test
     public void testDecodeSearchResultEntryEmptyAttributeListWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -620,6 +631,7 @@
     /**
      * Test the decoding of a SearchResultEntry with an empty type
      */
+    @Test
     public void testDecodeSearchResultEntryEmptyType()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -665,6 +677,7 @@
     /**
      * Test the decoding of a SearchResultEntry with a type alone
      */
+    @Test
     public void testDecodeSearchResultEntryTypeAlone()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -710,6 +723,7 @@
     /**
      * Test the decoding of a SearchResultEntry with an empty vals
      */
+    @Test
     public void testDecodeSearchResultEntryEmptyVals() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -790,6 +804,7 @@
     /**
      * Test the decoding of a SearchResultEntry with two empty vals
      */
+    @Test
     public void testDecodeSearchResultEntryEmptyVals2() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -872,6 +887,7 @@
     /**
      * Test the decoding of a SearchResultEntry with an empty vals with controls
      */
+    @Test
     public void testDecodeSearchResultEntryEmptyValsWithControls() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -965,6 +981,7 @@
     /**
      * Test the decoding of a SearchResultEntry with an empty attribute value
      */
+    @Test
     public void testDecodeSearchResultEntryEmptyAttributeValue() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1049,6 +1066,7 @@
      * Test the decoding of a SearchResultEntry with an empty attribute value
      * with controls
      */
+    @Test
     public void testDecodeSearchResultEntryEmptyAttributeValueWithControls() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java Fri Mar 13 15:17:52 2009
@@ -37,8 +37,10 @@
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.util.LdapURL;
 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;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -46,11 +48,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SearchResultReferenceTest extends TestCase
+public class SearchResultReferenceTest
 {
     /**
      * Test the decoding of a SearchResultReference
      */
+    @Test
     public void testDecodeSearchResultReferenceSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -170,6 +173,7 @@
     /**
      * Test the decoding of a SearchResultReference with controls
      */
+    @Test
     public void testDecodeSearchResultReferenceSuccessWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -311,6 +315,7 @@
     /**
      * Test the decoding of a SearchResultReference with no reference
      */
+    @Test
     public void testDecodeSearchResultReferenceNoReference()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -350,6 +355,7 @@
     /**
      * Test the decoding of a SearchResultReference with one reference
      */
+    @Test
     public void testDecodeSearchResultReferenceOneReference()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java Fri Mar 13 15:17:52 2009
@@ -31,9 +31,10 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Test;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNull;
 
 
 /**
@@ -41,7 +42,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class EntryChangeControlTest extends TestCase
+public class EntryChangeControlTest
 {
     /**
      * Test the decoding of a EntryChangeControl
@@ -70,7 +71,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         EntryChangeControlCodec entryChange = container.getEntryChangeControl();
@@ -108,7 +109,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         EntryChangeControlCodec entryChange = container.getEntryChangeControl();
@@ -145,7 +146,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         EntryChangeControlCodec entryChange = container.getEntryChangeControl();
@@ -190,7 +191,7 @@
             return;
         }
 
-        Assert.fail( "A ADD operation should not have a PreviousDN" );
+        fail( "A ADD operation should not have a PreviousDN" );
     }
 
 
@@ -221,7 +222,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         EntryChangeControlCodec entryChange = container.getEntryChangeControl();
@@ -263,7 +264,7 @@
             return;
         }
 
-        Assert.fail( "The changeType is unknown" );
+        fail( "The changeType is unknown" );
     }
 
 
@@ -301,7 +302,7 @@
             return;
         }
 
-        Assert.fail( "The changeNumber is incorrect" );
+        fail( "The changeNumber is incorrect" );
     }
 
 



Mime
View raw message