directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r764131 [12/16] - in /directory: apacheds/trunk/ apacheds/trunk/core-avl/ apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/ apacheds/trunk/core-avl/src/test/java/org/apache/directory/server/core/avltree/ apache...
Date Sat, 11 Apr 2009 01:03:25 GMT
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java Sat Apr 11 01:03:00 2009
@@ -20,11 +20,12 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import org.apache.directory.shared.ldap.message.AbstractMessage;
-import org.apache.directory.shared.ldap.message.MutableControl;
+import org.apache.directory.shared.ldap.message.InternalAbstractMessage;
+import org.apache.directory.shared.ldap.message.InternalControl;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -33,15 +34,16 @@
  * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
  *         $Rev$
  */
-public class AbstractMessageTest extends TestCase
+public class AbstractMessageTest
 {
     /**
      * Tests to see the same object returns true.
      */
+    @Test
     public void testEqualsSameObj()
     {
-        AbstractMessage msg;
-        msg = new AbstractMessage( 5, MessageTypeEnum.BIND_REQUEST )
+        InternalAbstractMessage msg;
+        msg = new InternalAbstractMessage( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
@@ -52,15 +54,16 @@
     /**
      * Tests to see the same exact copy returns true.
      */
+    @Test
     public void testEqualsExactCopy()
     {
-        AbstractMessage msg0;
-        AbstractMessage msg1;
-        msg0 = new AbstractMessage( 5, MessageTypeEnum.BIND_REQUEST )
+        InternalAbstractMessage msg0;
+        InternalAbstractMessage msg1;
+        msg0 = new InternalAbstractMessage( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
-        msg1 = new AbstractMessage( 5, MessageTypeEnum.BIND_REQUEST )
+        msg1 = new InternalAbstractMessage( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
@@ -72,15 +75,16 @@
     /**
      * Tests to make sure changes in the id result in inequality.
      */
+    @Test
     public void testNotEqualsDiffId()
     {
-        AbstractMessage msg0;
-        AbstractMessage msg1;
-        msg0 = new AbstractMessage( 5, MessageTypeEnum.BIND_REQUEST )
+        InternalAbstractMessage msg0;
+        InternalAbstractMessage msg1;
+        msg0 = new InternalAbstractMessage( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
-        msg1 = new AbstractMessage( 6, MessageTypeEnum.BIND_REQUEST )
+        msg1 = new InternalAbstractMessage( 6, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
@@ -92,15 +96,16 @@
     /**
      * Tests to make sure changes in the type result in inequality.
      */
+    @Test
     public void testNotEqualsDiffType()
     {
-        AbstractMessage msg0;
-        AbstractMessage msg1;
-        msg0 = new AbstractMessage( 5, MessageTypeEnum.BIND_REQUEST )
+        InternalAbstractMessage msg0;
+        InternalAbstractMessage msg1;
+        msg0 = new InternalAbstractMessage( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
-        msg1 = new AbstractMessage( 5, MessageTypeEnum.UNBIND_REQUEST )
+        msg1 = new InternalAbstractMessage( 5, MessageTypeEnum.UNBIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
@@ -112,15 +117,16 @@
     /**
      * Tests to make sure changes in the controls result in inequality.
      */
+    @Test
     public void testNotEqualsDiffControls()
     {
-        AbstractMessage msg0;
-        AbstractMessage msg1;
-        msg0 = new AbstractMessage( 5, MessageTypeEnum.BIND_REQUEST )
+        InternalAbstractMessage msg0;
+        InternalAbstractMessage msg1;
+        msg0 = new InternalAbstractMessage( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
-        msg0.add( new MutableControl()
+        msg0.add( new InternalControl()
         {
             private static final long serialVersionUID = 1L;
 
@@ -152,7 +158,7 @@
                 return null;
             }
         } );
-        msg1 = new AbstractMessage( 5, MessageTypeEnum.BIND_REQUEST )
+        msg1 = new InternalAbstractMessage( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java Sat Apr 11 01:03:00 2009
@@ -22,16 +22,17 @@
 
 import javax.naming.InvalidNameException;
 
-import org.apache.directory.shared.ldap.message.AbstractResultResponse;
-import org.apache.directory.shared.ldap.message.MutableControl;
-import org.apache.directory.shared.ldap.message.LdapResult;
+import org.apache.directory.shared.ldap.message.InternalAbstractResultResponse;
+import org.apache.directory.shared.ldap.message.InternalControl;
+import org.apache.directory.shared.ldap.message.InternalLdapResult;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
-import org.apache.directory.shared.ldap.message.Referral;
+import org.apache.directory.shared.ldap.message.InternalReferral;
 import org.apache.directory.shared.ldap.message.ReferralImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -40,15 +41,16 @@
  * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
  * @version $Rev$
  */
-public class AbstractResultResponseTest extends TestCase
+public class AbstractResultResponseTest
 {
     /**
      * Tests to see the same object returns true.
      */
+    @Test
     public void testEqualsSameObj()
     {
-        AbstractResultResponse msg;
-        msg = new AbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
+        InternalAbstractResultResponse msg;
+        msg = new InternalAbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
@@ -59,18 +61,19 @@
     /**
      * Tests to see the same exact copy returns true.
      */
+    @Test
     public void testEqualsExactCopy() throws InvalidNameException
     {
-        AbstractResultResponse msg0 = new AbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
+        InternalAbstractResultResponse msg0 = new InternalAbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
-        AbstractResultResponse msg1 = new AbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
+        InternalAbstractResultResponse msg1 = new InternalAbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
-        LdapResult r0 = msg0.getLdapResult();
-        LdapResult r1 = msg1.getLdapResult();
+        InternalLdapResult r0 = msg0.getLdapResult();
+        InternalLdapResult r1 = msg1.getLdapResult();
 
         r0.setErrorMessage( "blah blah blah" );
         r1.setErrorMessage( "blah blah blah" );
@@ -81,11 +84,11 @@
         r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
 
-        Referral refs0 = new ReferralImpl();
+        InternalReferral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        Referral refs1 = new ReferralImpl();
+        InternalReferral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 
@@ -97,18 +100,19 @@
     /**
      * Tests to see the same exact copy returns true.
      */
+    @Test
     public void testNotEqualsDiffResult() throws InvalidNameException
     {
-        AbstractResultResponse msg0 = new AbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
+        InternalAbstractResultResponse msg0 = new InternalAbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
-        AbstractResultResponse msg1 = new AbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
+        InternalAbstractResultResponse msg1 = new InternalAbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
-        LdapResult r0 = msg0.getLdapResult();
-        LdapResult r1 = msg1.getLdapResult();
+        InternalLdapResult r0 = msg0.getLdapResult();
+        InternalLdapResult r1 = msg1.getLdapResult();
 
         r0.setErrorMessage( "blah blah blah" );
         r1.setErrorMessage( "blah blah blah" );
@@ -119,11 +123,11 @@
         r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
 
-        Referral refs0 = new ReferralImpl();
+        InternalReferral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        Referral refs1 = new ReferralImpl();
+        InternalReferral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 
@@ -135,15 +139,16 @@
     /**
      * Tests to make sure changes in the id result in inequality.
      */
+    @Test
     public void testNotEqualsDiffId()
     {
-        AbstractResultResponse msg0;
-        AbstractResultResponse msg1;
-        msg0 = new AbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
+        InternalAbstractResultResponse msg0;
+        InternalAbstractResultResponse msg1;
+        msg0 = new InternalAbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
-        msg1 = new AbstractResultResponse( 6, MessageTypeEnum.BIND_REQUEST )
+        msg1 = new InternalAbstractResultResponse( 6, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
@@ -155,15 +160,16 @@
     /**
      * Tests to make sure changes in the type result in inequality.
      */
+    @Test
     public void testNotEqualsDiffType()
     {
-        AbstractResultResponse msg0;
-        AbstractResultResponse msg1;
-        msg0 = new AbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
+        InternalAbstractResultResponse msg0;
+        InternalAbstractResultResponse msg1;
+        msg0 = new InternalAbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
-        msg1 = new AbstractResultResponse( 5, MessageTypeEnum.UNBIND_REQUEST )
+        msg1 = new InternalAbstractResultResponse( 5, MessageTypeEnum.UNBIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
@@ -175,15 +181,16 @@
     /**
      * Tests to make sure changes in the controls result in inequality.
      */
+    @Test
     public void testNotEqualsDiffControls()
     {
-        AbstractResultResponse msg0;
-        AbstractResultResponse msg1;
-        msg0 = new AbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
+        InternalAbstractResultResponse msg0;
+        InternalAbstractResultResponse msg1;
+        msg0 = new InternalAbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };
-        msg0.add( new MutableControl()
+        msg0.add( new InternalControl()
         {
             private static final long serialVersionUID = 1L;
 
@@ -215,7 +222,7 @@
                 return null;
             }
         } );
-        msg1 = new AbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
+        msg1 = new InternalAbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
         {
             private static final long serialVersionUID = 1L;
         };

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java Sat Apr 11 01:03:00 2009
@@ -20,8 +20,6 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import junit.framework.TestCase;
-
 import java.util.HashMap;
 import java.util.Map;
 
@@ -35,12 +33,15 @@
 import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
 import org.apache.directory.shared.ldap.message.AbandonListener;
-import org.apache.directory.shared.ldap.message.AddRequest;
+import org.apache.directory.shared.ldap.message.InternalAddRequest;
 import org.apache.directory.shared.ldap.message.AddRequestImpl;
 import org.apache.directory.shared.ldap.message.MessageException;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
-import org.apache.directory.shared.ldap.message.ResultResponse;
+import org.apache.directory.shared.ldap.message.InternalResultResponse;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -49,7 +50,7 @@
  * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
  * @version $Rev$
  */
-public class AddRequestImplTest extends TestCase
+public class AddRequestImplTest
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
     
@@ -97,6 +98,7 @@
     /**
      * Tests the same object referrence for equality.
      */
+    @Test
     public void testEqualsSameObj()
     {
         AddRequestImpl req = new AddRequestImpl( 5 );
@@ -107,6 +109,7 @@
     /**
      * Tests for equality using exact copies.
      */
+    @Test
     public void testEqualsExactCopy() throws InvalidNameException, NamingException
     {
         AddRequestImpl req0 = new AddRequestImpl( 5 );
@@ -124,6 +127,7 @@
     /**
      * Test for inequality when only the IDs are different.
      */
+    @Test
     public void testNotEqualDiffId() throws InvalidNameException, NamingException
     {
         AddRequestImpl req0 = new AddRequestImpl( 7 );
@@ -141,6 +145,7 @@
     /**
      * Test for inequality when only the DN names are different.
      */
+    @Test
     public void testNotEqualDiffName() throws InvalidNameException, NamingException
     {
         AddRequestImpl req0 = new AddRequestImpl( 5 );
@@ -158,6 +163,7 @@
     /**
      * Test for inequality when only the DN names are different.
      */
+    @Test
     public void testNotEqualDiffAttributes() throws InvalidNameException, NamingException
     {
         AddRequestImpl req0 = new AddRequestImpl( 5 );
@@ -185,9 +191,10 @@
     /**
      * Tests for equality even when another BindRequest implementation is used.
      */
+    @Test
     public void testEqualsDiffImpl()
     {
-        AddRequest req0 = new AddRequest()
+        InternalAddRequest req0 = new InternalAddRequest()
         {
             public Entry getEntry()
             {
@@ -279,7 +286,7 @@
             }
 
 
-            public ResultResponse getResultResponse()
+            public InternalResultResponse getResultResponse()
             {
                 return null;
             }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java Sat Apr 11 01:03:00 2009
@@ -22,10 +22,14 @@
 
 import java.util.NoSuchElementException;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.ldap.message.ArrayNamingEnumeration;
 import org.apache.directory.shared.ldap.util.ArrayUtils;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -34,11 +38,12 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class ArrayNamingEnumerationTest extends TestCase
+public class ArrayNamingEnumerationTest
 {
     /**
      * Tests ArrayNamingEnumeration using an null array.
      */
+    @Test
     public void testUsingNullArray()
     {
         ArrayNamingEnumeration<Object> list = new ArrayNamingEnumeration<Object>( null );
@@ -59,6 +64,7 @@
     /**
      * Tests ArrayNamingEnumeration using an array with length = 0.
      */
+    @Test
     public void testUsingEmptyArray()
     {
         ArrayNamingEnumeration<String> list = new ArrayNamingEnumeration<String>( ArrayUtils.EMPTY_STRING_ARRAY );
@@ -79,6 +85,7 @@
     /**
      * Tests ArrayNamingEnumeration using an array with length = 1.
      */
+    @Test
     public void testUsingSingleElementArray()
     {
         ArrayNamingEnumeration<String> list = new ArrayNamingEnumeration<String>( new String[]
@@ -101,6 +108,7 @@
     /**
      * Tests ArrayNamingEnumeration using an array with length = 2.
      */
+    @Test
     public void testUsingTwoElementArray()
     {
         ArrayNamingEnumeration<String> list = new ArrayNamingEnumeration<String>( new String[]

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java Sat Apr 11 01:03:00 2009
@@ -20,20 +20,21 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import junit.framework.TestCase;
-
 import java.util.HashMap;
 import java.util.Map;
 
 import javax.naming.InvalidNameException;
 import javax.naming.ldap.Control;
 
-import org.apache.directory.shared.ldap.message.BindRequest;
+import org.apache.directory.shared.ldap.message.InternalBindRequest;
 import org.apache.directory.shared.ldap.message.BindRequestImpl;
 import org.apache.directory.shared.ldap.message.MessageException;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
-import org.apache.directory.shared.ldap.message.ResultResponse;
+import org.apache.directory.shared.ldap.message.InternalResultResponse;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -42,13 +43,14 @@
  * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
  *         $Rev$
  */
-public class BindRequestImplTest extends TestCase
+public class BindRequestImplTest
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
     /**
      * Tests the same object referrence for equality.
      */
+    @Test
     public void testEqualsSameObj()
     {
         BindRequestImpl req = new BindRequestImpl( 5 );
@@ -59,6 +61,7 @@
     /**
      * Tests for equality using exact copies.
      */
+    @Test
     public void testEqualsExactCopy() throws InvalidNameException
     {
         BindRequestImpl req0 = new BindRequestImpl( 5 );
@@ -80,6 +83,7 @@
     /**
      * Test for inequality when only the IDs are different.
      */
+    @Test
     public void testNotEqualDiffId() throws InvalidNameException
     {
         BindRequestImpl req0 = new BindRequestImpl( 7 );
@@ -101,6 +105,7 @@
     /**
      * Test for inequality when only the credentials are different.
      */
+    @Test
     public void testNotEqualDiffCreds() throws InvalidNameException
     {
         BindRequestImpl req0 = new BindRequestImpl( 5 );
@@ -122,6 +127,7 @@
     /**
      * Test for inequality when only the DN names are different.
      */
+    @Test
     public void testNotEqualDiffName() throws InvalidNameException
     {
         BindRequestImpl req0 = new BindRequestImpl( 5 );
@@ -143,6 +149,7 @@
     /**
      * Test for inequality when only the auth mechanisms are different.
      */
+    @Test
     public void testNotEqualDiffSimple() throws InvalidNameException
     {
         BindRequestImpl req0 = new BindRequestImpl( 5 );
@@ -164,6 +171,7 @@
     /**
      * Test for inequality when only the bind LDAP versions are different.
      */
+    @Test
     public void testNotEqualDiffVersion() throws InvalidNameException
     {
         BindRequestImpl req0 = new BindRequestImpl( 5 );
@@ -185,9 +193,10 @@
     /**
      * Tests for equality even when another BindRequest implementation is used.
      */
+    @Test
     public void testEqualsDiffImpl()
     {
-        BindRequest req0 = new BindRequest()
+        InternalBindRequest req0 = new InternalBindRequest()
         {
             public boolean isSimple()
             {
@@ -308,7 +317,7 @@
             }
 
 
-            public ResultResponse getResultResponse()
+            public InternalResultResponse getResultResponse()
             {
                 return null;
             }
@@ -323,6 +332,22 @@
             {
                 return false;
             }
+
+
+            public void abandon()
+            {
+            }
+
+
+            public void addAbandonListener( AbandonListener listener )
+            {
+            }
+
+
+            public boolean isAbandoned()
+            {
+                return false;
+            }
         };
 
         BindRequestImpl req1 = new BindRequestImpl( 5 );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindResponseImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindResponseImplTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindResponseImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindResponseImplTest.java Sat Apr 11 01:03:00 2009
@@ -24,12 +24,13 @@
 
 import org.apache.directory.shared.ldap.message.BindResponseImpl;
 import org.apache.directory.shared.ldap.message.LdapResultImpl;
-import org.apache.directory.shared.ldap.message.Referral;
+import org.apache.directory.shared.ldap.message.InternalReferral;
 import org.apache.directory.shared.ldap.message.ReferralImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -38,12 +39,13 @@
  * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
  *         $Rev$
  */
-public class BindResponseImplTest extends TestCase
+public class BindResponseImplTest
 
 {
     /**
      * Tests to make sure the same object returns true with equals().
      */
+    @Test
     public void testEqualsSameObj()
     {
         BindResponseImpl resp = new BindResponseImpl( 1 );
@@ -54,6 +56,7 @@
     /**
      * Tests to make sure newly created objects with same id are equal.
      */
+    @Test
     public void testEqualsNewWithSameId()
     {
         BindResponseImpl resp0 = new BindResponseImpl( 1 );
@@ -67,6 +70,7 @@
      * Tests to make sure newly created objects with same different id are not
      * equal.
      */
+    @Test
     public void testNotEqualsNewWithDiffId()
     {
         BindResponseImpl resp0 = new BindResponseImpl( 1 );
@@ -80,6 +84,7 @@
      * Tests to make sure newly created objects with same different saslCreds
      * are not equal.
      */
+    @Test
     public void testNotEqualsNewWithDiffSaslCreds()
     {
         BindResponseImpl resp0 = new BindResponseImpl( 1 );
@@ -94,6 +99,7 @@
     /**
      * Tests for equality of two fully loaded identical BindResponse PDUs.
      */
+    @Test
     public void testEqualsWithTheWorks() throws InvalidNameException
     {
         LdapResultImpl r0 = new LdapResultImpl();
@@ -108,11 +114,11 @@
         r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
 
-        Referral refs0 = new ReferralImpl();
+        InternalReferral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        Referral refs1 = new ReferralImpl();
+        InternalReferral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java Sat Apr 11 01:03:00 2009
@@ -20,8 +20,6 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import junit.framework.TestCase;
-
 import java.util.HashMap;
 import java.util.Map;
 
@@ -30,12 +28,15 @@
 
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.message.AbandonListener;
-import org.apache.directory.shared.ldap.message.CompareRequest;
+import org.apache.directory.shared.ldap.message.InternalCompareRequest;
 import org.apache.directory.shared.ldap.message.CompareRequestImpl;
 import org.apache.directory.shared.ldap.message.MessageException;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
-import org.apache.directory.shared.ldap.message.ResultResponse;
+import org.apache.directory.shared.ldap.message.InternalResultResponse;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -44,13 +45,14 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class CompareRequestImplTest extends TestCase
+public class CompareRequestImplTest
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
     /**
      * Tests the same object referrence for equality.
      */
+    @Test
     public void testEqualsSameObj()
     {
         CompareRequestImpl req = new CompareRequestImpl( 5 );
@@ -61,6 +63,7 @@
     /**
      * Tests for equality using exact copies.
      */
+    @Test
     public void testEqualsExactCopy() throws InvalidNameException
     {
         CompareRequestImpl req0 = new CompareRequestImpl( 5 );
@@ -81,6 +84,7 @@
     /**
      * Test for inequality when only the IDs are different.
      */
+    @Test
     public void testNotEqualDiffId() throws InvalidNameException
     {
         CompareRequestImpl req0 = new CompareRequestImpl( 7 );
@@ -97,6 +101,7 @@
     /**
      * Test for inequality when only the attributeIds are different.
      */
+    @Test
     public void testNotEqualDiffAttributeIds() throws InvalidNameException
     {
         CompareRequestImpl req0 = new CompareRequestImpl( 5 );
@@ -117,6 +122,7 @@
     /**
      * Test for inequality when only the Assertion values are different.
      */
+    @Test
     public void testNotEqualDiffValue() throws InvalidNameException
     {
         CompareRequestImpl req0 = new CompareRequestImpl( 5 );
@@ -138,9 +144,10 @@
      * Tests for equality even when another CompareRequest implementation is
      * used.
      */
+    @Test
     public void testEqualsDiffImpl()
     {
-        CompareRequest req0 = new CompareRequest()
+        InternalCompareRequest req0 = new InternalCompareRequest()
         {
             public Value<?> getAssertionValue()
             {
@@ -251,7 +258,7 @@
             }
 
 
-            public ResultResponse getResultResponse()
+            public InternalResultResponse getResultResponse()
             {
                 return null;
             }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java Sat Apr 11 01:03:00 2009
@@ -20,8 +20,6 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import junit.framework.TestCase;
-
 import java.util.HashMap;
 import java.util.Map;
 
@@ -29,12 +27,15 @@
 import javax.naming.ldap.Control;
 
 import org.apache.directory.shared.ldap.message.AbandonListener;
-import org.apache.directory.shared.ldap.message.DeleteRequest;
+import org.apache.directory.shared.ldap.message.InternalDeleteRequest;
 import org.apache.directory.shared.ldap.message.DeleteRequestImpl;
 import org.apache.directory.shared.ldap.message.MessageException;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
-import org.apache.directory.shared.ldap.message.ResultResponse;
+import org.apache.directory.shared.ldap.message.InternalResultResponse;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -43,13 +44,14 @@
  * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
  * @version $Rev$
  */
-public class DeleteRequestImplTest extends TestCase
+public class DeleteRequestImplTest
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
     /**
      * Tests the same object referrence for equality.
      */
+    @Test
     public void testEqualsSameObj()
     {
         DeleteRequestImpl req = new DeleteRequestImpl( 5 );
@@ -60,6 +62,7 @@
     /**
      * Tests for equality using exact copies.
      */
+    @Test
     public void testEqualsExactCopy() throws InvalidNameException
     {
         DeleteRequestImpl req0 = new DeleteRequestImpl( 5 );
@@ -75,6 +78,7 @@
     /**
      * Test for inequality when only the IDs are different.
      */
+    @Test
     public void testNotEqualDiffId() throws InvalidNameException
     {
         DeleteRequestImpl req0 = new DeleteRequestImpl( 7 );
@@ -90,6 +94,7 @@
     /**
      * Test for inequality when only the DN names are different.
      */
+    @Test
     public void testNotEqualDiffName() throws InvalidNameException
     {
         DeleteRequestImpl req0 = new DeleteRequestImpl( 5 );
@@ -106,9 +111,10 @@
      * Tests for equality even when another DeleteRequest implementation is
      * used.
      */
+    @Test
     public void testEqualsDiffImpl()
     {
-        DeleteRequest req0 = new DeleteRequest()
+        InternalDeleteRequest req0 = new InternalDeleteRequest()
         {
             public LdapDN getName()
             {
@@ -189,7 +195,7 @@
             }
 
 
-            public ResultResponse getResultResponse()
+            public InternalResultResponse getResultResponse()
             {
                 return null;
             }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java Sat Apr 11 01:03:00 2009
@@ -20,8 +20,6 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import junit.framework.TestCase;
-
 import java.util.HashMap;
 import java.util.Map;
 
@@ -29,11 +27,14 @@
 import javax.naming.ldap.Control;
 import javax.naming.ldap.ExtendedResponse;
 
-import org.apache.directory.shared.ldap.message.ExtendedRequest;
+import org.apache.directory.shared.ldap.message.InternalExtendedRequest;
 import org.apache.directory.shared.ldap.message.ExtendedRequestImpl;
 import org.apache.directory.shared.ldap.message.MessageException;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
-import org.apache.directory.shared.ldap.message.ResultResponse;
+import org.apache.directory.shared.ldap.message.InternalResultResponse;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -42,13 +43,14 @@
  * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
  * @version $Rev$
  */
-public class ExtendedRequestImplTest extends TestCase
+public class ExtendedRequestImplTest
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
     /**
      * Tests the same object referrence for equality.
      */
+    @Test
     public void testEqualsSameObj()
     {
         ExtendedRequestImpl req = new ExtendedRequestImpl( 5 );
@@ -59,6 +61,7 @@
     /**
      * Tests for equality using exact copies.
      */
+    @Test
     public void testEqualsExactCopy()
     {
         ExtendedRequestImpl req0 = new ExtendedRequestImpl( 5 );
@@ -77,6 +80,7 @@
     /**
      * Test for inequality when only the IDs are different.
      */
+    @Test
     public void testNotEqualDiffId()
     {
         ExtendedRequestImpl req0 = new ExtendedRequestImpl( 7 );
@@ -90,6 +94,7 @@
     /**
      * Test for inequality when only the OID is different.
      */
+    @Test
     public void testNotEqualDiffOID()
     {
         ExtendedRequestImpl req0 = new ExtendedRequestImpl( 5 );
@@ -108,6 +113,7 @@
     /**
      * Test for inequality when only the Assertion values are different.
      */
+    @Test
     public void testNotEqualDiffValue()
     {
         ExtendedRequestImpl req0 = new ExtendedRequestImpl( 5 );
@@ -127,9 +133,10 @@
      * Tests for equality even when another ExtendedRequest implementation is
      * used.
      */
+    @Test
     public void testEqualsDiffImpl()
     {
-        ExtendedRequest req0 = new ExtendedRequest()
+        InternalExtendedRequest req0 = new InternalExtendedRequest()
         {
             private static final long serialVersionUID = 1L;
 
@@ -208,7 +215,7 @@
             }
 
 
-            public ResultResponse getResultResponse()
+            public InternalResultResponse getResultResponse()
             {
                 return null;
             }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java Sat Apr 11 01:03:00 2009
@@ -20,23 +20,24 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import junit.framework.TestCase;
-
 import java.util.HashMap;
 import java.util.Map;
 
 import javax.naming.InvalidNameException;
 import javax.naming.ldap.Control;
 
-import org.apache.directory.shared.ldap.message.ExtendedResponse;
+import org.apache.directory.shared.ldap.message.InternalExtendedResponse;
 import org.apache.directory.shared.ldap.message.ExtendedResponseImpl;
-import org.apache.directory.shared.ldap.message.LdapResult;
+import org.apache.directory.shared.ldap.message.InternalLdapResult;
 import org.apache.directory.shared.ldap.message.LdapResultImpl;
 import org.apache.directory.shared.ldap.message.MessageException;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.ReferralImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -45,7 +46,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class ExtendedResponseImplTest extends TestCase
+public class ExtendedResponseImplTest
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
@@ -60,7 +61,7 @@
         ExtendedResponseImpl response = new ExtendedResponseImpl( 45 );
         response.setResponse( "Hello World!".getBytes() );
         response.setResponseName( "1.1.1.1" );
-        LdapResult result = response.getLdapResult();
+        InternalLdapResult result = response.getLdapResult();
         
         try
         {
@@ -84,6 +85,7 @@
     /**
      * Tests for equality using the same object.
      */
+    @Test
     public void testEqualsSameObj()
     {
         ExtendedResponseImpl resp = createStub();
@@ -94,6 +96,7 @@
     /**
      * Tests for equality using an exact copy.
      */
+    @Test
     public void testEqualsExactCopy()
     {
         ExtendedResponseImpl resp0 = createStub();
@@ -106,10 +109,11 @@
     /**
      * Tests for equality using different stub implementations.
      */
+    @Test
     public void testEqualsDiffImpl()
     {
         ExtendedResponseImpl resp0 = createStub();
-        ExtendedResponse resp1 = new ExtendedResponse()
+        InternalExtendedResponse resp1 = new InternalExtendedResponse()
         {
             private static final long serialVersionUID = 5297000474419901408L;
 
@@ -136,7 +140,7 @@
             }
 
 
-            public LdapResult getLdapResult()
+            public InternalLdapResult getLdapResult()
             {
                 LdapResultImpl result = new LdapResultImpl();
                 
@@ -231,6 +235,7 @@
     /**
      * Tests inequality when messageIds are different.
      */
+    @Test
     public void testNotEqualsDiffIds()
     {
         ExtendedResponseImpl resp0 = new ExtendedResponseImpl( 3 );
@@ -244,6 +249,7 @@
     /**
      * Tests inequality when responseNames are different.
      */
+    @Test
     public void testNotEqualsDiffNames()
     {
         ExtendedResponseImpl resp0 = createStub();
@@ -259,6 +265,7 @@
     /**
      * Tests inequality when responses are different.
      */
+    @Test
     public void testNotEqualsDiffResponses()
     {
         ExtendedResponseImpl resp0 = createStub();

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java Sat Apr 11 01:03:00 2009
@@ -22,14 +22,15 @@
 
 import javax.naming.InvalidNameException;
 
-import org.apache.directory.shared.ldap.message.LdapResult;
+import org.apache.directory.shared.ldap.message.InternalLdapResult;
 import org.apache.directory.shared.ldap.message.LdapResultImpl;
-import org.apache.directory.shared.ldap.message.Referral;
+import org.apache.directory.shared.ldap.message.InternalReferral;
 import org.apache.directory.shared.ldap.message.ReferralImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -38,11 +39,12 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  *         $Rev$
  */
-public class LdapResultImplTest extends TestCase
+public class LdapResultImplTest
 {
     /**
      * Tests to make sure the two same objects are seen as equal.
      */
+    @Test
     public void testEqualsSameObj()
     {
         LdapResultImpl r0 = new LdapResultImpl();
@@ -54,6 +56,7 @@
      * Tests to make sure a default LdapResultImpl equals another one just
      * created.
      */
+    @Test
     public void testEqualsDefaultCopy()
     {
         LdapResultImpl r0 = new LdapResultImpl();
@@ -67,6 +70,7 @@
     /**
      * Tests for equality when the lockable parent is not the same.
      */
+    @Test
     public void testEqualsDiffLockableParent()
     {
         LdapResultImpl r0 = new LdapResultImpl();
@@ -80,10 +84,11 @@
     /**
      * Tests for equality when the lockable parent is the same.
      */
+    @Test
     public void testEqualsDiffImpl()
     {
         LdapResultImpl r0 = new LdapResultImpl();
-        LdapResult r1 = new LdapResult()
+        InternalLdapResult r1 = new InternalLdapResult()
         {
             public ResultCodeEnum getResultCode()
             {
@@ -124,13 +129,13 @@
             }
 
 
-            public Referral getReferral()
+            public InternalReferral getReferral()
             {
                 return null;
             }
 
 
-            public void setReferral( Referral a_referral )
+            public void setReferral( InternalReferral a_referral )
             {
             }
         };
@@ -143,6 +148,7 @@
     /**
      * Tests two non default carbon copies for equality.
      */
+    @Test
     public void testEqualsCarbonCopy() throws InvalidNameException
     {
         LdapResultImpl r0 = new LdapResultImpl();
@@ -157,11 +163,11 @@
         r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
 
-        Referral refs0 = new ReferralImpl();
+        InternalReferral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        Referral refs1 = new ReferralImpl();
+        InternalReferral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 
@@ -173,6 +179,7 @@
     /**
      * Tests for inequality when the error message is different.
      */
+    @Test
     public void testNotEqualsDiffErrorMessage() throws InvalidNameException
     {
         LdapResultImpl r0 = new LdapResultImpl();
@@ -187,11 +194,11 @@
         r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
 
-        Referral refs0 = new ReferralImpl();
+        InternalReferral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        Referral refs1 = new ReferralImpl();
+        InternalReferral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 
@@ -203,6 +210,7 @@
     /**
      * Tests for inequality when the matchedDn properties are not the same.
      */
+    @Test
     public void testNotEqualsDiffMatchedDn() throws InvalidNameException
     {
         LdapResultImpl r0 = new LdapResultImpl();
@@ -217,11 +225,11 @@
         r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
 
-        Referral refs0 = new ReferralImpl();
+        InternalReferral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        Referral refs1 = new ReferralImpl();
+        InternalReferral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 
@@ -233,6 +241,7 @@
     /**
      * Tests for inequality when the resultCode properties are not the same.
      */
+    @Test
     public void testNotEqualsDiffResultCode() throws InvalidNameException
     {
         LdapResultImpl r0 = new LdapResultImpl();
@@ -247,11 +256,11 @@
         r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
         r1.setResultCode( ResultCodeEnum.SIZE_LIMIT_EXCEEDED );
 
-        Referral refs0 = new ReferralImpl();
+        InternalReferral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        Referral refs1 = new ReferralImpl();
+        InternalReferral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 
@@ -263,6 +272,7 @@
     /**
      * Tests for inequality when the referrals are not the same.
      */
+    @Test
     public void testNotEqualsDiffReferrals() throws InvalidNameException
     {
         LdapResultImpl r0 = new LdapResultImpl();
@@ -277,12 +287,12 @@
         r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
 
-        Referral refs0 = new ReferralImpl();
+        InternalReferral refs0 = new ReferralImpl();
         r0.setReferral( refs0 );
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        Referral refs1 = new ReferralImpl();
+        InternalReferral refs1 = new ReferralImpl();
         r1.setReferral( refs1 );
         refs1.addLdapUrl( "ldap://abc.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java Sat Apr 11 01:03:00 2009
@@ -20,8 +20,6 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import junit.framework.TestCase;
-
 import java.util.HashMap;
 import java.util.Map;
 
@@ -31,11 +29,14 @@
 import org.apache.directory.shared.ldap.message.AbandonListener;
 import org.apache.directory.shared.ldap.message.MessageException;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
-import org.apache.directory.shared.ldap.message.ModifyDnRequest;
+import org.apache.directory.shared.ldap.message.InternalModifyDnRequest;
 import org.apache.directory.shared.ldap.message.ModifyDnRequestImpl;
-import org.apache.directory.shared.ldap.message.ResultResponse;
+import org.apache.directory.shared.ldap.message.InternalResultResponse;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -44,7 +45,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class ModifyDnRequestImplTest extends TestCase
+public class ModifyDnRequestImplTest
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
@@ -53,7 +54,7 @@
      * 
      * @return the request
      */
-    public ModifyDnRequestImpl getRequest()
+    private ModifyDnRequestImpl getRequest()
     {
         // Construct the ModifyDn request to test
         ModifyDnRequestImpl request = new ModifyDnRequestImpl( 45 );
@@ -77,6 +78,7 @@
     /**
      * Tests the same object referrence for equality.
      */
+    @Test
     public void testEqualsSameObj()
     {
         ModifyDnRequestImpl req = new ModifyDnRequestImpl( 5 );
@@ -87,6 +89,7 @@
     /**
      * Tests for equality using exact copies.
      */
+    @Test
     public void testEqualsExactCopy0()
     {
         ModifyDnRequestImpl req0 = getRequest();
@@ -99,6 +102,7 @@
     /**
      * Tests for equality using exact copies.
      */
+    @Test
     public void testEqualsExactCopy1()
     {
         ModifyDnRequestImpl req0 = getRequest();
@@ -113,6 +117,7 @@
     /**
      * Test for inequality when only the IDs are different.
      */
+    @Test
     public void testNotEqualDiffId()
     {
         ModifyDnRequestImpl req0 = new ModifyDnRequestImpl( 4 );
@@ -125,6 +130,7 @@
     /**
      * Test for inequality when only the DN names are different.
      */
+    @Test
     public void testNotEqualDiffName() throws InvalidNameException
     {
         ModifyDnRequestImpl req0 = getRequest();
@@ -140,6 +146,7 @@
     /**
      * Test for inequality when only the newSuperior DNs are different.
      */
+    @Test
     public void testNotEqualDiffNewSuperior() throws InvalidNameException
     {
         ModifyDnRequestImpl req0 = getRequest();
@@ -155,6 +162,7 @@
     /**
      * Test for inequality when only the delete old Rdn properties is different.
      */
+    @Test
     public void testNotEqualDiffDeleteOldRdn()
     {
         ModifyDnRequestImpl req0 = getRequest();
@@ -170,6 +178,7 @@
     /**
      * Test for inequality when only the new Rdn properties are different.
      */
+    @Test
     public void testNotEqualDiffNewRdn() throws InvalidNameException
     {
         ModifyDnRequestImpl req0 = getRequest();
@@ -186,9 +195,10 @@
     /**
      * Tests for equality even when another BindRequest implementation is used.
      */
+    @Test
     public void testEqualsDiffImpl()
     {
-        ModifyDnRequest req0 = new ModifyDnRequest()
+        InternalModifyDnRequest req0 = new InternalModifyDnRequest()
         {
             public LdapDN getName()
             {
@@ -332,7 +342,7 @@
             }
 
 
-            public ResultResponse getResultResponse()
+            public InternalResultResponse getResultResponse()
             {
                 return null;
             }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java Sat Apr 11 01:03:00 2009
@@ -20,8 +20,6 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import junit.framework.TestCase;
-
 import javax.naming.InvalidNameException;
 import javax.naming.ldap.Control;
 
@@ -33,10 +31,13 @@
 import org.apache.directory.shared.ldap.message.AbandonListener;
 import org.apache.directory.shared.ldap.message.MessageException;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
-import org.apache.directory.shared.ldap.message.ModifyRequest;
+import org.apache.directory.shared.ldap.message.InternalModifyRequest;
 import org.apache.directory.shared.ldap.message.ModifyRequestImpl;
-import org.apache.directory.shared.ldap.message.ResultResponse;
+import org.apache.directory.shared.ldap.message.InternalResultResponse;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import java.util.Collection;
 import java.util.ArrayList;
@@ -51,7 +52,7 @@
  * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
  * @version $Rev$
  */
-public class ModifyRequestImplTest extends TestCase
+public class ModifyRequestImplTest
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
@@ -60,7 +61,7 @@
      * 
      * @return the ModifyRequest to use for tests
      */
-    public ModifyRequestImpl getRequest()
+    private ModifyRequestImpl getRequest()
     {
         // Construct the Modify request to test
         ModifyRequestImpl req = new ModifyRequestImpl( 45 );
@@ -99,6 +100,7 @@
     /**
      * Tests the same object referrence for equality.
      */
+    @Test
     public void testEqualsSameObj()
     {
         ModifyRequestImpl req = getRequest();
@@ -109,6 +111,7 @@
     /**
      * Tests for equality using exact copies.
      */
+    @Test
     public void testEqualsExactCopy()
     {
         ModifyRequestImpl req0 = getRequest();
@@ -120,6 +123,7 @@
     /**
      * Test for inequality when only the IDs are different.
      */
+    @Test
     public void testNotEqualDiffId()
     {
         ModifyRequestImpl req0 = new ModifyRequestImpl( 7 );
@@ -131,6 +135,7 @@
     /**
      * Test for inequality when only the DN names are different.
      */
+    @Test
     public void testNotEqualDiffName()
     {
         try
@@ -152,6 +157,7 @@
     /**
      * Test for inequality when only the mods ops are different.
      */
+    @Test
     public void testNotEqualDiffModOps()
     {
         ModifyRequestImpl req0 = getRequest();
@@ -178,6 +184,7 @@
     /**
      * Test for inequality when only the number of mods are different.
      */
+    @Test
     public void testNotEqualDiffModCount()
     {
         ModifyRequestImpl req0 = getRequest();
@@ -198,6 +205,7 @@
     /**
      * Test for inequality when only the mods attribute Id's are different.
      */
+    @Test
     public void testNotEqualDiffModIds()
     {
         ModifyRequestImpl req0 = getRequest();
@@ -224,6 +232,7 @@
     /**
      * Test for inequality when only the mods attribute values are different.
      */
+    @Test
     public void testNotEqualDiffModValues()
     {
         ModifyRequestImpl req0 = getRequest();
@@ -251,9 +260,10 @@
     /**
      * Tests for equality even when another BindRequest implementation is used.
      */
+    @Test
     public void testEqualsDiffImpl()
     {
-        ModifyRequest req0 = new ModifyRequest()
+        InternalModifyRequest req0 = new InternalModifyRequest()
         {
             public Collection<Modification> getModificationItems()
             {
@@ -377,7 +387,7 @@
             }
 
 
-            public ResultResponse getResultResponse()
+            public InternalResultResponse getResultResponse()
             {
                 return null;
             }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ReferralImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ReferralImplTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ReferralImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ReferralImplTest.java Sat Apr 11 01:03:00 2009
@@ -20,13 +20,14 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import junit.framework.TestCase;
-
 import java.util.Collection;
 import java.util.Collections;
 
-import org.apache.directory.shared.ldap.message.Referral;
+import org.apache.directory.shared.ldap.message.InternalReferral;
 import org.apache.directory.shared.ldap.message.ReferralImpl;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -35,11 +36,12 @@
  * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
  *         $Rev$
  */
-public class ReferralImplTest extends TestCase
+public class ReferralImplTest
 {
     /**
      * Tests to make sure the equals method works for the same exact object.
      */
+    @Test
     public void testEqualsSameObject()
     {
         ReferralImpl refs = new ReferralImpl();
@@ -51,6 +53,7 @@
      * Tests to make sure the equals method works for two objects that are the
      * same exact copy of one another.
      */
+    @Test
     public void testEqualsExactCopy()
     {
         ReferralImpl refs0 = new ReferralImpl();
@@ -70,6 +73,7 @@
      * Tests to make sure the equals method works for two objects that are the
      * same exact copy of one another but there are redundant entries.
      */
+    @Test
     public void testEqualsExactCopyWithRedundancy()
     {
         ReferralImpl refs0 = new ReferralImpl();
@@ -91,6 +95,7 @@
      * Tests to make sure the equals method works for two objects that are the
      * not exact copies of one another but have the same number of URLs.
      */
+    @Test
     public void testEqualsSameNumberButDifferentUrls()
     {
         ReferralImpl refs0 = new ReferralImpl();
@@ -113,6 +118,7 @@
      * not exact copies of one another and one has a subset of the urls of the
      * other.
      */
+    @Test
     public void testEqualsSubset()
     {
         ReferralImpl refs0 = new ReferralImpl();
@@ -128,9 +134,10 @@
     }
 
 
+    @Test
     public void testEqualsDifferentImpls()
     {
-        Referral refs0 = new Referral()
+        InternalReferral refs0 = new InternalReferral()
         {
             public Collection<String> getLdapUrls()
             {

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java Sat Apr 11 01:03:00 2009
@@ -20,23 +20,24 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import junit.framework.TestCase;
-
 import java.util.HashMap;
 import java.util.Map;
 
 import javax.naming.InvalidNameException;
 import javax.naming.ldap.Control;
 
-import org.apache.directory.shared.ldap.message.LdapResult;
+import org.apache.directory.shared.ldap.message.InternalLdapResult;
 import org.apache.directory.shared.ldap.message.LdapResultImpl;
 import org.apache.directory.shared.ldap.message.MessageException;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.ReferralImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.message.SearchResponseDone;
+import org.apache.directory.shared.ldap.message.InternalSearchResponseDone;
 import org.apache.directory.shared.ldap.message.SearchResponseDoneImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -45,7 +46,7 @@
  * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
  *         $Rev$
  */
-public class SearchResponseDoneImplTest extends TestCase
+public class SearchResponseDoneImplTest
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
@@ -58,7 +59,7 @@
     {
         // Construct the Search response to test with results and referrals
         SearchResponseDoneImpl response = new SearchResponseDoneImpl( 45 );
-        LdapResult result = response.getLdapResult();
+        InternalLdapResult result = response.getLdapResult();
         
         try
         {
@@ -82,6 +83,7 @@
     /**
      * Tests for equality using the same object.
      */
+    @Test
     public void testEqualsSameObj()
     {
         SearchResponseDoneImpl resp = createStub();
@@ -92,6 +94,7 @@
     /**
      * Tests for equality using an exact copy.
      */
+    @Test
     public void testEqualsExactCopy()
     {
         SearchResponseDoneImpl resp0 = createStub();
@@ -104,12 +107,13 @@
     /**
      * Tests for equality using different stub implementations.
      */
+    @Test
     public void testEqualsDiffImpl()
     {
         SearchResponseDoneImpl resp0 = createStub();
-        SearchResponseDone resp1 = new SearchResponseDone()
+        InternalSearchResponseDone resp1 = new InternalSearchResponseDone()
         {
-            public LdapResult getLdapResult()
+            public InternalLdapResult getLdapResult()
             {
                 LdapResultImpl result = new LdapResultImpl();
                 
@@ -191,6 +195,7 @@
     /**
      * Tests inequality when messageIds are different.
      */
+    @Test
     public void testNotEqualsDiffIds()
     {
         SearchResponseDoneImpl resp0 = new SearchResponseDoneImpl( 3 );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java Sat Apr 11 01:03:00 2009
@@ -20,14 +20,8 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import junit.framework.TestCase;
-
-import java.util.HashMap;
-import java.util.Map;
-
 import javax.naming.InvalidNameException;
 import javax.naming.NamingException;
-import javax.naming.ldap.Control;
 
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -35,6 +29,9 @@
 import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
 import org.apache.directory.shared.ldap.message.SearchResponseEntryImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -43,10 +40,8 @@
  * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
  *         $Rev$
  */
-public class SearchResponseEntryImplTest extends TestCase
+public class SearchResponseEntryImplTest
 {
-    private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
-
     /**
      * Creates and populates an EntryAttribute with a specific id.
      * 
@@ -68,7 +63,7 @@
      * 
      * @return The populated Entry object
      */
-    Entry getEntry() throws NamingException
+    private Entry getEntry() throws NamingException
     {
         Entry attrs = new DefaultClientEntry();
         attrs.put( getEntry( "attr0" ) );
@@ -81,6 +76,7 @@
     /**
      * Tests for equality when the same object referrence is used.
      */
+    @Test
     public void testEqualsSameObject()
     {
         SearchResponseEntryImpl resp = new SearchResponseEntryImpl( 5 );
@@ -91,6 +87,7 @@
     /**
      * Tests for equality when an exact copy is compared.
      */
+    @Test
     public void testEqualsExactCopy() throws InvalidNameException, NamingException
     {
         SearchResponseEntryImpl resp0 = new SearchResponseEntryImpl( 5 );
@@ -109,6 +106,7 @@
     /**
      * Tests for inequality when the objectName dn is not the same.
      */
+    @Test
     public void testNotEqualDiffObjectName() throws InvalidNameException, NamingException
     {
         SearchResponseEntryImpl resp0 = new SearchResponseEntryImpl( 5 );
@@ -127,6 +125,7 @@
     /**
      * Tests for inequality when the attributes are not the same.
      */
+    @Test
     public void testNotEqualDiffAttributes() throws InvalidNameException, NamingException
     {
         SearchResponseEntryImpl resp0 = new SearchResponseEntryImpl( 5 );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java Sat Apr 11 01:03:00 2009
@@ -20,8 +20,6 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import junit.framework.TestCase;
-
 import java.util.HashMap;
 import java.util.Map;
 
@@ -29,10 +27,13 @@
 
 import org.apache.directory.shared.ldap.message.MessageException;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
-import org.apache.directory.shared.ldap.message.Referral;
+import org.apache.directory.shared.ldap.message.InternalReferral;
 import org.apache.directory.shared.ldap.message.ReferralImpl;
-import org.apache.directory.shared.ldap.message.SearchResponseReference;
+import org.apache.directory.shared.ldap.message.InternalSearchResponseReference;
 import org.apache.directory.shared.ldap.message.SearchResponseReferenceImpl;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -41,7 +42,7 @@
  * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
  * @version $Rev$
  */
-public class SearchResponseReferenceImplTest extends TestCase
+public class SearchResponseReferenceImplTest
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
@@ -53,7 +54,7 @@
      *            the parent lockable
      * @return the newly created referral for testing
      */
-    public Referral getReferral( SearchResponseReference resp )
+    private InternalReferral getReferral( InternalSearchResponseReference resp )
     {
         ReferralImpl ref = new ReferralImpl();
         resp.setReferral( ref );
@@ -67,6 +68,7 @@
     /**
      * Tests for equality when the same object referrence is used.
      */
+    @Test
     public void testEqualsSameObject()
     {
         SearchResponseReferenceImpl resp = new SearchResponseReferenceImpl( 5 );
@@ -78,6 +80,7 @@
     /**
      * Tests for equality when an exact copy is compared.
      */
+    @Test
     public void testEqualsExactCopy()
     {
         SearchResponseReferenceImpl resp0 = new SearchResponseReferenceImpl( 5 );
@@ -93,17 +96,18 @@
     /**
      * Tests for equality when a different implementation is used.
      */
+    @Test
     public void testEqualsDiffImpl()
     {
-        SearchResponseReference resp0 = new SearchResponseReference()
+        InternalSearchResponseReference resp0 = new InternalSearchResponseReference()
         {
-            public Referral getReferral()
+            public InternalReferral getReferral()
             {
                 return SearchResponseReferenceImplTest.this.getReferral( this );
             }
 
 
-            public void setReferral( Referral a_referral )
+            public void setReferral( InternalReferral a_referral )
             {
             }
 
@@ -170,6 +174,7 @@
     /**
      * Tests for inequality when the urls are not the same.
      */
+    @Test
     public void testNotEqualDiffUrls()
     {
         SearchResponseReferenceImpl resp0 = new SearchResponseReferenceImpl( 5 );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserDIRSERVER_584_Test.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserDIRSERVER_584_Test.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserDIRSERVER_584_Test.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserDIRSERVER_584_Test.java Sat Apr 11 01:03:00 2009
@@ -24,7 +24,8 @@
 
 import javax.naming.InvalidNameException;
 
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -34,12 +35,13 @@
  * @version $Rev$, $Date$, 
  * @see <a href="https://issues.apache.org/jira/browse/DIRSERVER-584">DIRSERVER-584</a>
  */
-public class DnParserDIRSERVER_584_Test extends TestCase
+public class DnParserDIRSERVER_584_Test
 {
    /**
     * Need this testa() to run first to mess up the state of the static parser.
     */
-   public void testa() throws Exception
+    @Test
+    public void testa() throws Exception
    {
        try
        {
@@ -57,7 +59,8 @@
     * Need this testb() to run second to use the mess up static parser.  This
     * test should succeed but fails.
     */
-   public void testb() throws Exception
+    @Test
+    public void testb() throws Exception
    {
        LdapDnParser.parseInternal( "ou=system", new ArrayList<Rdn>() );
    }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDnParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDnParserTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDnParserTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDnParserTest.java Sat Apr 11 01:03:00 2009
@@ -25,10 +25,12 @@
 import javax.naming.NameParser;
 import javax.naming.NamingException;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.junit.Test;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
 
 
 /**
@@ -37,7 +39,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$, 
  */
-public class LdapDnParserTest extends TestCase
+public class LdapDnParserTest
 {
     // ~ Methods
     // ------------------------------------------------------------------------------------
@@ -47,47 +49,51 @@
     /**
      * test an empty DN
      */
+    @Test
     public void testLdapDNEmpty() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
 
-        Assert.assertEquals( "", ( ( LdapDN ) dnParser.parse( "" ) ).getUpName() );
+        assertEquals( "", ( ( LdapDN ) dnParser.parse( "" ) ).getUpName() );
     }
 
 
     /**
      * test a simple DN : a = b
      */
+    @Test
     public void testLdapDNSimple() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
 
-        Assert.assertEquals( "a = b", ( ( LdapDN ) dnParser.parse( "a = b" ) ).getUpName() );
-        Assert.assertEquals( "a=b", ( ( LdapDN ) dnParser.parse( "a = b" ) ).toString() );
+        assertEquals( "a = b", ( ( LdapDN ) dnParser.parse( "a = b" ) ).getUpName() );
+        assertEquals( "a=b", ( ( LdapDN ) dnParser.parse( "a = b" ) ).toString() );
     }
 
 
     /**
      * test a composite DN : a = b, d = e
      */
+    @Test
     public void testLdapDNComposite() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "a = b, c = d" );
-        Assert.assertEquals( "a=b,c=d", dn.toString() );
-        Assert.assertEquals( "a = b, c = d", dn.getUpName() );
+        assertEquals( "a=b,c=d", dn.toString() );
+        assertEquals( "a = b, c = d", dn.getUpName() );
     }
 
 
     /**
      * test a composite DN with or without spaces: a=b, a =b, a= b, a = b, a = b
      */
+    @Test
     public void testLdapDNCompositeWithSpace() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "a=b, a =b, a= b, a = b, a  =  b" );
-        Assert.assertEquals( "a=b,a=b,a=b,a=b,a=b", dn.toString() );
-        Assert.assertEquals( "a=b, a =b, a= b, a = b, a  =  b", dn.getUpName() );
+        assertEquals( "a=b,a=b,a=b,a=b,a=b", dn.toString() );
+        assertEquals( "a=b, a =b, a= b, a = b, a  =  b", dn.getUpName() );
     }
 
 
@@ -95,24 +101,26 @@
      * test a composite DN with differents separators : a=b;c=d,e=f It should
      * return a=b,c=d,e=f (the ';' is replaced by a ',')
      */
+    @Test
     public void testLdapDNCompositeSepators() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "a=b;c=d,e=f" );
-        Assert.assertEquals( "a=b,c=d,e=f", dn.toString() );
-        Assert.assertEquals( "a=b;c=d,e=f", dn.getUpName() );
+        assertEquals( "a=b,c=d,e=f", dn.toString() );
+        assertEquals( "a=b;c=d,e=f", dn.getUpName() );
     }
 
 
     /**
      * test a simple DN with multiple NameComponents : a = b + c = d
      */
+    @Test
     public void testLdapDNSimpleMultivaluedAttribute() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "a = b + c = d" );
-        Assert.assertEquals( "a=b+c=d", dn.toString() );
-        Assert.assertEquals( "a = b + c = d", dn.getUpName() );
+        assertEquals( "a=b+c=d", dn.toString() );
+        assertEquals( "a = b + c = d", dn.getUpName() );
     }
 
 
@@ -120,36 +128,39 @@
      * test a composite DN with multiple NC and separators : a=b+c=d, e=f + g=h +
      * i=j
      */
+    @Test
     public void testLdapDNCompositeMultivaluedAttribute() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "a=b+c=d, e=f + g=h + i=j" );
-        Assert.assertEquals( "a=b+c=d,e=f+g=h+i=j", dn.toString() );
-        Assert.assertEquals( "a=b+c=d, e=f + g=h + i=j", dn.getUpName() );
+        assertEquals( "a=b+c=d,e=f+g=h+i=j", dn.toString() );
+        assertEquals( "a=b+c=d, e=f + g=h + i=j", dn.getUpName() );
     }
 
 
     /**
      * test a simple DN with an oid prefix (uppercase) : OID.12.34.56 = azerty
      */
+    @Test
     public void testLdapDNOidUpper() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "OID.12.34.56 = azerty" );
-        Assert.assertEquals( "oid.12.34.56=azerty", dn.toString() );
-        Assert.assertEquals( "OID.12.34.56 = azerty", dn.getUpName() );
+        assertEquals( "oid.12.34.56=azerty", dn.toString() );
+        assertEquals( "OID.12.34.56 = azerty", dn.getUpName() );
     }
 
 
     /**
      * test a simple DN with an oid prefix (lowercase) : oid.12.34.56 = azerty
      */
+    @Test
     public void testLdapDNOidLower() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "oid.12.34.56 = azerty" );
-        Assert.assertEquals( "oid.12.34.56=azerty", dn.toString() );
-        Assert.assertEquals( "oid.12.34.56 = azerty", dn.getUpName() );
+        assertEquals( "oid.12.34.56=azerty", dn.toString() );
+        assertEquals( "oid.12.34.56 = azerty", dn.getUpName() );
     }
 
 
@@ -157,12 +168,13 @@
      * test a simple DN with an oid attribut without oid prefix : 12.34.56 =
      * azerty
      */
+    @Test
     public void testLdapDNOidWithoutPrefix() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "12.34.56 = azerty" );
-        Assert.assertEquals( "12.34.56=azerty", dn.toString() );
-        Assert.assertEquals( "12.34.56 = azerty", dn.getUpName() );
+        assertEquals( "12.34.56=azerty", dn.toString() );
+        assertEquals( "12.34.56 = azerty", dn.getUpName() );
     }
 
 
@@ -170,42 +182,46 @@
      * test a composite DN with an oid attribut wiithout oid prefix : 12.34.56 =
      * azerty; 7.8 = test
      */
+    @Test
     public void testLdapDNCompositeOidWithoutPrefix() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "12.34.56 = azerty; 7.8 = test" );
-        Assert.assertEquals( "12.34.56=azerty,7.8=test", dn.toString() );
-        Assert.assertEquals( "12.34.56 = azerty; 7.8 = test", dn.getUpName() );
+        assertEquals( "12.34.56=azerty,7.8=test", dn.toString() );
+        assertEquals( "12.34.56 = azerty; 7.8 = test", dn.getUpName() );
     }
 
 
     /**
      * test a simple DN with pair char attribute value : a = \,\=\+\<\>\#\;\\\"\C3\A9"
      */
+    @Test
     public void testLdapDNPairCharAttributeValue() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\\C3\\A9" );
-        Assert.assertEquals( "a=\\,=\\+\\<\\>#\\;\\\\\\\"\\C3\\A9", dn.toString() );
-        Assert.assertEquals( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\\C3\\A9", dn.getUpName() );
+        assertEquals( "a=\\,=\\+\\<\\>#\\;\\\\\\\"\\C3\\A9", dn.toString() );
+        assertEquals( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\\C3\\A9", dn.getUpName() );
     }
 
 
     /**
      * test a simple DN with hexString attribute value : a = #0010A0AAFF
      */
+    @Test
     public void testLdapDNHexStringAttributeValue() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "a = #0010A0AAFF" );
-        Assert.assertEquals( "a=#0010A0AAFF", dn.toString() );
-        Assert.assertEquals( "a = #0010A0AAFF", dn.getUpName() );
+        assertEquals( "a=#0010A0AAFF", dn.toString() );
+        assertEquals( "a = #0010A0AAFF", dn.getUpName() );
     }
 
 
     /**
      * test exception from illegal hexString attribute value : a=#zz.
      */
+    @Test
     public void testBadLdapDNHexStringAttributeValue() throws InvalidNameException
     {
         try
@@ -228,18 +244,20 @@
     /**
      * test a simple DN with quoted attribute value : a = "quoted \"value"
      */
+    @Test
     public void testLdapDNQuotedAttributeValue() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "a = quoted \\\"value" );
-        Assert.assertEquals( "a=quoted \\\"value", dn.toString() );
-        Assert.assertEquals( "a = quoted \\\"value", dn.getUpName() );
+        assertEquals( "a=quoted \\\"value", dn.toString() );
+        assertEquals( "a = quoted \\\"value", dn.getUpName() );
     }
 
 
     /**
      * Test the encoding of a LdanDN
      */
+    @Test
     public void testNameToBytes() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
@@ -247,11 +265,12 @@
 
         byte[] bytes = LdapDN.getBytes( dn );
 
-        Assert.assertEquals( 30, bytes.length );
-        Assert.assertEquals( "cn=John,ou=People,ou=Marketing", StringTools.utf8ToString( bytes ) );
+        assertEquals( 30, bytes.length );
+        assertEquals( "cn=John,ou=People,ou=Marketing", StringTools.utf8ToString( bytes ) );
     }
 
 
+    @Test
     public void testStringParser() throws NamingException
     {
         String dn = StringTools.utf8ToString( new byte[]
@@ -261,11 +280,12 @@
         NameParser dnParser = LdapDnParser.getNameParser();
         LdapDN name = ( LdapDN ) dnParser.parse( dn );
 
-        Assert.assertEquals( dn, name.getUpName() );
-        Assert.assertEquals( "cn=Emmanuel  L\\C3\\A9charny", name.toString() );
+        assertEquals( dn, name.getUpName() );
+        assertEquals( "cn=Emmanuel  L\\C3\\A9charny", name.toString() );
     }
 
 
+    @Test
     public void testStringParserShort() throws NamingException
     {
         String dn = StringTools.utf8ToString( new byte[]
@@ -274,21 +294,22 @@
         NameParser dnParser = LdapDnParser.getNameParser();
         LdapDN name = ( LdapDN ) dnParser.parse( dn );
 
-        Assert.assertEquals( dn, name.getUpName() );
-        Assert.assertEquals( "c=E\\C3\\A9c", name.toString() );
+        assertEquals( dn, name.getUpName() );
+        assertEquals( "c=E\\C3\\A9c", name.toString() );
     }
 
 
+    @Test
     public void testVsldapExtras() throws NamingException
     {
         NameParser dnParser = LdapDnParser.getNameParser();
         LdapDN name = ( LdapDN ) dnParser
             .parse( "cn=Billy Bakers, OID.2.5.4.11=Corporate Tax, ou=Fin-Accounting, ou=Americas, ou=Search, o=IMC, c=US" );
 
-        Assert.assertEquals(
+        assertEquals(
             "cn=Billy Bakers, OID.2.5.4.11=Corporate Tax, ou=Fin-Accounting, ou=Americas, ou=Search, o=IMC, c=US", name
                 .getUpName() );
-        Assert.assertEquals(
+        assertEquals(
             "cn=Billy Bakers,oid.2.5.4.11=Corporate Tax,ou=Fin-Accounting,ou=Americas,ou=Search,o=IMC,c=US", name
                 .toString() );
     }
@@ -504,6 +525,7 @@
     }
 
 
+    @Test
     public void testWindowsFilePath() throws Exception
     {
         // '\' should be escaped as stated in RFC 2253
@@ -515,6 +537,7 @@
     }
 
 
+    @Test
     public void testNameFrenchChars() throws Exception
     {
         String cn = new String( new byte[]
@@ -529,6 +552,7 @@
     }
 
 
+    @Test
     public void testNameGermanChars() throws Exception
     {
         String cn = new String( new byte[]
@@ -543,6 +567,7 @@
     }
 
 
+    @Test
     public void testNameTurkishChars() throws Exception
     {
         String cn = new String( new byte[]
@@ -559,6 +584,7 @@
     }
     
    
+    @Test
     public void testAUmlautPlusBytes() throws Exception
     {
         String cn = new String( new byte[] { 'c', 'n', '=', (byte)0xC3, (byte)0x84, 0x5C, 0x32, 0x42 }, "UTF-8" );
@@ -571,6 +597,7 @@
     }
 
 
+    @Test
     public void testAUmlautPlusChar() throws Exception
     {
         String cn = new String( new byte[] { 'c', 'n', '=', (byte)0xC3, (byte)0x84, '\\', '+' }, "UTF-8" );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/ByteArrayComparatorTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/ByteArrayComparatorTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/ByteArrayComparatorTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/ByteArrayComparatorTest.java Sat Apr 11 01:03:00 2009
@@ -21,8 +21,8 @@
 
 
 import org.apache.directory.shared.ldap.schema.comparators.ByteArrayComparator;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 
 /**
@@ -31,44 +31,51 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class ByteArrayComparatorTest extends TestCase
+public class ByteArrayComparatorTest
 {
+    @Test
     public void testBothNull()
     {
         assertEquals( 0, ByteArrayComparator.INSTANCE.compare( null, null ) );
     }
 
     
+    @Test
     public void testB2Null()
     {
         assertEquals( 1, ByteArrayComparator.INSTANCE.compare( new byte[0], null ) );
     }
 
     
+    @Test
     public void testB1Null()
     {
         assertEquals( -1, ByteArrayComparator.INSTANCE.compare( null, new byte[0] ) );
     }
 
     
+    @Test
     public void testBothEmpty()
     {
         assertEquals( 0, ByteArrayComparator.INSTANCE.compare( new byte[0], new byte[0] ) );
     }
 
     
+    @Test
     public void testBothEqualLengthOne()
     {
         assertEquals( 0, ByteArrayComparator.INSTANCE.compare( new byte[1], new byte[1] ) );
     }
 
     
+    @Test
     public void testBothEqualLengthTen()
     {
         assertEquals( 0, ByteArrayComparator.INSTANCE.compare( new byte[10], new byte[10] ) );
     }
     
     
+    @Test
     public void testB1PrefixOfB2()
     {
         byte[] b1 = new byte[] { 0, 1, 2 };
@@ -78,6 +85,7 @@
     }
     
     
+    @Test
     public void testB2PrefixOfB1()
     {
         byte[] b1 = new byte[] { 0, 1, 2, 3 };
@@ -87,6 +95,7 @@
     }
     
     
+    @Test
     public void testB1GreaterThanB2() 
     {
         byte[] b1 = new byte[] { 0, 5 };
@@ -96,6 +105,7 @@
     }
 
 
+    @Test
     public void testB1GreaterThanB2SameLength() 
     {
         byte[] b1 = new byte[] { 0, 5 };
@@ -105,6 +115,7 @@
     }
 
 
+    @Test
     public void testB2GreaterThanB1() 
     {
         byte[] b1 = new byte[] { 0, 1, 2 };
@@ -114,6 +125,7 @@
     }
 
 
+    @Test
     public void testB2GreaterThanB1SameLength() 
     {
         byte[] b1 = new byte[] { 0, 1 };



Mime
View raw message