directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r987606 [25/25] - in /directory/shared/trunk: ./ all/ asn1-codec/ asn1-codec/src/main/java/org/apache/directory/shared/asn1/codec/ asn1/ asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/ asn1/src/main/java/org/apache/director...
Date Fri, 20 Aug 2010 19:23:37 GMT
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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -33,8 +33,6 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.message.internal.InternalExtendedRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -50,6 +48,7 @@ public class ExtendedRequestImplTest
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
+
     /**
      * Tests the same object reference for equality.
      */
@@ -68,12 +67,12 @@ public class ExtendedRequestImplTest
     public void testEqualsExactCopy()
     {
         ExtendedRequestImpl req0 = new ExtendedRequestImpl( 5 );
-        req0.setOid( "1.1.1.1" );
-        req0.setPayload( "Hello World!".getBytes() );
+        req0.setRequestName( "1.1.1.1" );
+        req0.setRequestValue( "Hello World!".getBytes() );
 
         ExtendedRequestImpl req1 = new ExtendedRequestImpl( 5 );
-        req1.setOid( "1.1.1.1" );
-        req1.setPayload( "Hello World!".getBytes() );
+        req1.setRequestName( "1.1.1.1" );
+        req1.setRequestValue( "Hello World!".getBytes() );
 
         assertTrue( req0.equals( req1 ) );
         assertTrue( req1.equals( req0 ) );
@@ -98,12 +97,12 @@ public class ExtendedRequestImplTest
     public void testHashCodeExactCopy()
     {
         ExtendedRequestImpl req0 = new ExtendedRequestImpl( 5 );
-        req0.setOid( "1.1.1.1" );
-        req0.setPayload( "Hello World!".getBytes() );
+        req0.setRequestName( "1.1.1.1" );
+        req0.setRequestValue( "Hello World!".getBytes() );
 
         ExtendedRequestImpl req1 = new ExtendedRequestImpl( 5 );
-        req1.setOid( "1.1.1.1" );
-        req1.setPayload( "Hello World!".getBytes() );
+        req1.setRequestName( "1.1.1.1" );
+        req1.setRequestValue( "Hello World!".getBytes() );
 
         assertTrue( req0.hashCode() == req1.hashCode() );
     }
@@ -130,12 +129,12 @@ public class ExtendedRequestImplTest
     public void testNotEqualDiffOID()
     {
         ExtendedRequestImpl req0 = new ExtendedRequestImpl( 5 );
-        req0.setOid( "1.1.1.1" );
-        req0.setPayload( "Hello World!".getBytes() );
+        req0.setRequestName( "1.1.1.1" );
+        req0.setRequestValue( "Hello World!".getBytes() );
 
         ExtendedRequestImpl req1 = new ExtendedRequestImpl( 5 );
-        req0.setOid( "1.2.2.1" );
-        req0.setPayload( "Hello World!".getBytes() );
+        req0.setRequestName( "1.2.2.1" );
+        req0.setRequestValue( "Hello World!".getBytes() );
 
         assertFalse( req0.equals( req1 ) );
         assertFalse( req1.equals( req0 ) );
@@ -149,12 +148,12 @@ public class ExtendedRequestImplTest
     public void testNotEqualDiffValue()
     {
         ExtendedRequestImpl req0 = new ExtendedRequestImpl( 5 );
-        req0.setOid( "1.1.1.1" );
-        req0.setPayload( "Hello ".getBytes() );
+        req0.setRequestName( "1.1.1.1" );
+        req0.setRequestValue( "Hello ".getBytes() );
 
         ExtendedRequestImpl req1 = new ExtendedRequestImpl( 5 );
-        req0.setOid( "1.1.1.1" );
-        req0.setPayload( "World!".getBytes() );
+        req0.setRequestName( "1.1.1.1" );
+        req0.setRequestValue( "World!".getBytes() );
 
         assertFalse( req0.equals( req1 ) );
         assertFalse( req1.equals( req0 ) );
@@ -168,29 +167,23 @@ public class ExtendedRequestImplTest
     @Test
     public void testEqualsDiffImpl()
     {
-        InternalExtendedRequest req0 = new InternalExtendedRequest()
+        ExtendedRequest req0 = new ExtendedRequest()
         {
             private static final long serialVersionUID = 1L;
 
 
-            public String getOid()
-            {
-                return null;
-            }
-
-
-            public void setOid( String oid )
+            public void setRequestName( String oid )
             {
             }
 
 
-            public byte[] getPayload()
+            public byte[] getRequestValue()
             {
                 return null;
             }
 
 
-            public void setPayload( byte[] payload )
+            public void setRequestValue( byte[] payload )
             {
             }
 
@@ -213,18 +206,18 @@ public class ExtendedRequestImplTest
             }
 
 
-            public Map<String,Control> getControls()
+            public Map<String, Control> getControls()
             {
                 return EMPTY_CONTROL_MAP;
             }
 
 
-            public void add( Control control ) throws MessageException
+            public void addControl( Control control ) throws MessageException
             {
             }
 
 
-            public void remove( Control control ) throws MessageException
+            public void removeControl( Control control ) throws MessageException
             {
             }
 
@@ -247,39 +240,72 @@ public class ExtendedRequestImplTest
             }
 
 
-            public InternalResultResponse getResultResponse()
+            public ResultResponse getResultResponse()
             {
                 return null;
             }
 
 
-            public String getID()
+            public String getRequestName()
             {
                 return null;
             }
 
 
-            public byte[] getEncodedValue()
+            public ExtendedResponse createExtendedResponse( String id, byte[] berValue, int offset, int length )
+                throws NamingException
             {
                 return null;
             }
 
 
-            public ExtendedResponse createExtendedResponse( String id, byte[] berValue, int offset, int length )
-                throws NamingException
+            public void addAllControls( Control[] controls ) throws MessageException
+            {
+            }
+
+
+            public boolean hasControl( String oid )
+            {
+                return false;
+            }
+
+
+            public Control getCurrentControl()
             {
                 return null;
             }
 
 
-            public void addAll( Control[] controls ) throws MessageException
+            public int getControlsLength()
             {
+                return 0;
             }
 
 
-            public boolean hasControl( String oid )
+            public void setControlsLength( int controlsLength )
+            {
+            }
+
+
+            public int getMessageLength()
+            {
+                return 0;
+            }
+
+
+            public void setMessageLength( int messageLength )
+            {
+            }
+
+
+            public Control getControl( String oid )
+            {
+                return null;
+            }
+
+
+            public void setMessageId( int messageId )
             {
-                return false;
             }
         };
 

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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -31,8 +31,6 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.message.internal.InternalExtendedResponse;
-import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
 import org.apache.directory.shared.ldap.name.DN;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -49,6 +47,7 @@ public class ExtendedResponseImplTest
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
+
     /**
      * Creates and populates a ExtendedResponseImpl stub for testing purposes.
      * 
@@ -58,10 +57,10 @@ public class ExtendedResponseImplTest
     {
         // Construct the Search response to test with results and referrals
         ExtendedResponseImpl response = new ExtendedResponseImpl( 45 );
-        response.setResponse( "Hello World!".getBytes() );
+        response.setResponseValue( "Hello World!".getBytes() );
         response.setResponseName( "1.1.1.1" );
-        InternalLdapResult result = response.getLdapResult();
-        
+        LdapResult result = response.getLdapResult();
+
         try
         {
             result.setMatchedDn( new DN( "dc=example,dc=com" ) );
@@ -70,7 +69,7 @@ public class ExtendedResponseImplTest
         {
             // Do nothing
         }
-        
+
         result.setResultCode( ResultCodeEnum.SUCCESS );
         ReferralImpl refs = new ReferralImpl();
         refs.addLdapUrl( "ldap://someserver.com" );
@@ -112,46 +111,58 @@ public class ExtendedResponseImplTest
     public void testEqualsDiffImpl()
     {
         ExtendedResponseImpl resp0 = createStub();
-        InternalExtendedResponse resp1 = new InternalExtendedResponse()
+        ExtendedResponse resp1 = new ExtendedResponse()
         {
             private static final long serialVersionUID = 5297000474419901408L;
 
 
+            public String getID()
+            {
+                return "1.1.1.1";
+            }
+
+
             public String getResponseName()
             {
                 return "1.1.1.1";
             }
 
 
-            public void setResponseName( String a_oid )
+            public void setResponseName( String oid )
             {
             }
 
 
-            public byte[] getResponse()
+            public byte[] getEncodedValue()
             {
                 return "Hello World!".getBytes();
             }
 
 
-            public void setResponse( byte[] a_value )
+            public byte[] getResponseValue()
             {
+                return "Hello World!".getBytes();
             }
 
 
-            public InternalLdapResult getLdapResult()
+            public void setResponseValue( byte[] value )
+            {
+            }
+
+
+            public LdapResult getLdapResult()
             {
                 LdapResultImpl result = new LdapResultImpl();
-                
-                try 
+
+                try
                 {
                     result.setMatchedDn( new DN( "dc=example,dc=com" ) );
                 }
-                catch ( LdapException ine ) 
+                catch ( LdapException ine )
                 {
                     // do nothing
                 }
-                
+
                 result.setResultCode( ResultCodeEnum.SUCCESS );
                 ReferralImpl refs = new ReferralImpl();
                 refs.addLdapUrl( "ldap://someserver.com" );
@@ -175,12 +186,12 @@ public class ExtendedResponseImplTest
             }
 
 
-            public void add( Control a_control ) throws MessageException
+            public void addControl( Control a_control ) throws MessageException
             {
             }
 
 
-            public void remove( Control a_control ) throws MessageException
+            public void removeControl( Control a_control ) throws MessageException
             {
             }
 
@@ -203,26 +214,53 @@ public class ExtendedResponseImplTest
             }
 
 
-            public String getID()
+            public void addAllControls( Control[] controls ) throws MessageException
             {
-                return "1.1.1.1";
             }
 
 
-            public byte[] getEncodedValue()
+            public boolean hasControl( String oid )
+            {
+                return false;
+            }
+
+
+            public Control getCurrentControl()
             {
-                return getResponse();
+                return null;
             }
 
 
-            public void addAll( Control[] controls ) throws MessageException
+            public int getControlsLength()
             {
+                return 0;
             }
 
 
-            public boolean hasControl( String oid )
+            public void setControlsLength( int controlsLength )
+            {
+            }
+
+
+            public int getMessageLength()
+            {
+                return 0;
+            }
+
+
+            public void setMessageLength( int messageLength )
+            {
+            }
+
+
+            public Control getControl( String oid )
+            {
+                return null;
+            }
+
+
+            public void setMessageId( int messageId )
             {
-                return false;
             }
         };
 
@@ -291,9 +329,9 @@ public class ExtendedResponseImplTest
     public void testNotEqualsDiffResponses()
     {
         ExtendedResponseImpl resp0 = createStub();
-        resp0.setResponse( "abc".getBytes() );
+        resp0.setResponseValue( "abc".getBytes() );
         ExtendedResponseImpl resp1 = createStub();
-        resp1.setResponse( "123".getBytes() );
+        resp1.setResponseValue( "123".getBytes() );
 
         assertFalse( resp0.equals( resp1 ) );
         assertFalse( resp1.equals( resp0 ) );

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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -20,21 +20,16 @@
 package org.apache.directory.shared.ldap.message;
 
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.ldap.exception.LdapException;
-import org.apache.directory.shared.ldap.message.LdapResultImpl;
-import org.apache.directory.shared.ldap.message.ReferralImpl;
-import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
-import org.apache.directory.shared.ldap.message.internal.InternalReferral;
 import org.apache.directory.shared.ldap.name.DN;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
 
 /**
  * Tests the methods of the LdapResultImpl class.
@@ -93,7 +88,8 @@ public class LdapResultImplTest
     public void testEqualsDiffImpl()
     {
         LdapResultImpl r0 = new LdapResultImpl();
-        InternalLdapResult r1 = new InternalLdapResult()
+
+        LdapResult r1 = new LdapResult()
         {
             public ResultCodeEnum getResultCode()
             {
@@ -134,13 +130,13 @@ public class LdapResultImplTest
             }
 
 
-            public InternalReferral getReferral()
+            public Referral getReferral()
             {
                 return null;
             }
 
 
-            public void setReferral( InternalReferral a_referral )
+            public void setReferral( Referral referral )
             {
             }
         };
@@ -168,11 +164,11 @@ public class LdapResultImplTest
         r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
 
-        InternalReferral refs0 = new ReferralImpl();
+        Referral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        InternalReferral refs1 = new ReferralImpl();
+        Referral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 
@@ -237,11 +233,11 @@ public class LdapResultImplTest
         r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
 
-        InternalReferral refs0 = new ReferralImpl();
+        Referral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        InternalReferral refs1 = new ReferralImpl();
+        Referral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 
@@ -267,11 +263,11 @@ public class LdapResultImplTest
         r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
 
-        InternalReferral refs0 = new ReferralImpl();
+        Referral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        InternalReferral refs1 = new ReferralImpl();
+        Referral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 
@@ -293,16 +289,16 @@ public class LdapResultImplTest
         r1.setErrorMessage( "blah blah blah" );
 
         r0.setMatchedDn( new DN( "dc=example,dc=com" ) );
-        r1.setMatchedDn( new DN( "dc=apache,dc=org")  );
+        r1.setMatchedDn( new DN( "dc=apache,dc=org" ) );
 
         r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
 
-        InternalReferral refs0 = new ReferralImpl();
+        Referral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        InternalReferral refs1 = new ReferralImpl();
+        Referral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 
@@ -329,11 +325,11 @@ public class LdapResultImplTest
         r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
         r1.setResultCode( ResultCodeEnum.SIZE_LIMIT_EXCEEDED );
 
-        InternalReferral refs0 = new ReferralImpl();
+        Referral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        InternalReferral refs1 = new ReferralImpl();
+        Referral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 
@@ -360,12 +356,12 @@ public class LdapResultImplTest
         r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
 
-        InternalReferral refs0 = new ReferralImpl();
+        Referral refs0 = new ReferralImpl();
         r0.setReferral( refs0 );
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        InternalReferral refs1 = new ReferralImpl();
+        Referral 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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -31,8 +31,6 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.message.internal.InternalModifyDnRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.name.RDN;
 import org.junit.Test;
@@ -50,6 +48,7 @@ public class ModifyDnRequestImplTest
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
+
     /**
      * Constructs a ModifyDnrequest to test.
      * 
@@ -60,7 +59,7 @@ public class ModifyDnRequestImplTest
         // Construct the ModifyDn request to test
         ModifyDnRequestImpl request = new ModifyDnRequestImpl( 45 );
         request.setDeleteOldRdn( true );
-        
+
         try
         {
             request.setName( new DN( "dc=admins,dc=apache,dc=org" ) );
@@ -71,7 +70,7 @@ public class ModifyDnRequestImplTest
         {
             // do nothing
         }
-        
+
         return request;
     }
 
@@ -118,40 +117,40 @@ public class ModifyDnRequestImplTest
     /**
     * Tests the same object reference for equal hashCode
     */
-   @Test
-   public void testHashCodeSameObj()
-   {
-       ModifyDnRequestImpl req = new ModifyDnRequestImpl( 5 );
-       assertTrue( req.hashCode() == req.hashCode() );
-   }
+    @Test
+    public void testHashCodeSameObj()
+    {
+        ModifyDnRequestImpl req = new ModifyDnRequestImpl( 5 );
+        assertTrue( req.hashCode() == req.hashCode() );
+    }
 
 
-   /**
-    * Tests for equal hashCode using exact copies.
-    */
-   @Test
-   public void testHashCodeExactCopy0()
-   {
-       ModifyDnRequestImpl req0 = getRequest();
-       ModifyDnRequestImpl req1 = getRequest();
+    /**
+     * Tests for equal hashCode using exact copies.
+     */
+    @Test
+    public void testHashCodeExactCopy0()
+    {
+        ModifyDnRequestImpl req0 = getRequest();
+        ModifyDnRequestImpl req1 = getRequest();
 
-       assertTrue( req0.hashCode() == req1.hashCode() );
-   }
+        assertTrue( req0.hashCode() == req1.hashCode() );
+    }
 
 
-   /**
-    * Tests for equal hashCode using exact copies.
-    */
-   @Test
-   public void testHashCodeExactCopy1()
-   {
-       ModifyDnRequestImpl req0 = getRequest();
-       req0.setNewSuperior( null );
-       ModifyDnRequestImpl req1 = getRequest();
-       req1.setNewSuperior( null );
+    /**
+     * Tests for equal hashCode using exact copies.
+     */
+    @Test
+    public void testHashCodeExactCopy1()
+    {
+        ModifyDnRequestImpl req0 = getRequest();
+        req0.setNewSuperior( null );
+        ModifyDnRequestImpl req1 = getRequest();
+        req1.setNewSuperior( null );
 
-       assertTrue( req0.hashCode() == req1.hashCode() );
-   }
+        assertTrue( req0.hashCode() == req1.hashCode() );
+    }
 
 
     /**
@@ -238,7 +237,7 @@ public class ModifyDnRequestImplTest
     @Test
     public void testEqualsDiffImpl()
     {
-        InternalModifyDnRequest req0 = new InternalModifyDnRequest()
+        ModifyDnRequest req0 = new ModifyDnRequest()
         {
             public DN getName()
             {
@@ -338,12 +337,12 @@ public class ModifyDnRequestImplTest
             }
 
 
-            public void add( Control a_control ) throws MessageException
+            public void addControl( Control a_control ) throws MessageException
             {
             }
 
 
-            public void remove( Control a_control ) throws MessageException
+            public void removeControl( Control a_control ) throws MessageException
             {
             }
 
@@ -382,13 +381,13 @@ public class ModifyDnRequestImplTest
             }
 
 
-            public InternalResultResponse getResultResponse()
+            public ResultResponse getResultResponse()
             {
                 return null;
             }
 
 
-            public void addAll( Control[] controls ) throws MessageException
+            public void addAllControls( Control[] controls ) throws MessageException
             {
             }
 
@@ -397,6 +396,45 @@ public class ModifyDnRequestImplTest
             {
                 return false;
             }
+
+
+            public Control getCurrentControl()
+            {
+                return null;
+            }
+
+
+            public int getControlsLength()
+            {
+                return 0;
+            }
+
+
+            public void setControlsLength( int controlsLength )
+            {
+            }
+
+
+            public int getMessageLength()
+            {
+                return 0;
+            }
+
+
+            public void setMessageLength( int messageLength )
+            {
+            }
+
+
+            public Control getControl( String oid )
+            {
+                return null;
+            }
+
+
+            public void setMessageId( int messageId )
+            {
+            }
         };
 
         ModifyDnRequestImpl req1 = getRequest();

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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -32,15 +32,13 @@ import java.util.Map;
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
-import org.apache.directory.shared.ldap.entry.DefaultModification;
 import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
+import org.apache.directory.shared.ldap.entry.DefaultModification;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.message.internal.InternalModifyRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
 import org.apache.directory.shared.ldap.name.DN;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -57,6 +55,7 @@ public class ModifyRequestImplTest
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
+
     /**
      * Builds a ModifyRequest for testing purposes.
      * 
@@ -66,8 +65,8 @@ public class ModifyRequestImplTest
     {
         // Construct the Modify request to test
         ModifyRequestImpl req = new ModifyRequestImpl( 45 );
-        
-        try 
+
+        try
         {
             req.setName( new DN( "cn=admin,dc=apache,dc=org" ) );
         }
@@ -287,9 +286,9 @@ public class ModifyRequestImplTest
     @Test
     public void testEqualsDiffImpl()
     {
-        InternalModifyRequest req0 = new InternalModifyRequest()
+        ModifyRequest req0 = new ModifyRequest()
         {
-            public Collection<Modification> getModificationItems()
+            public Collection<Modification> getModifications()
             {
                 List<Modification> list = new ArrayList<Modification>();
                 EntryAttribute attr = new DefaultEntryAttribute( "attr0" );
@@ -367,12 +366,12 @@ public class ModifyRequestImplTest
             }
 
 
-            public void add( Control a_control ) throws MessageException
+            public void addControl( Control a_control ) throws MessageException
             {
             }
 
 
-            public void remove( Control a_control ) throws MessageException
+            public void removeControl( Control a_control ) throws MessageException
             {
             }
 
@@ -411,13 +410,13 @@ public class ModifyRequestImplTest
             }
 
 
-            public InternalResultResponse getResultResponse()
+            public ResultResponse getResultResponse()
             {
                 return null;
             }
 
 
-            public void addAll( Control[] controls ) throws MessageException
+            public void addAllControls( Control[] controls ) throws MessageException
             {
             }
 
@@ -426,6 +425,112 @@ public class ModifyRequestImplTest
             {
                 return false;
             }
+
+
+            public Control getCurrentControl()
+            {
+                return null;
+            }
+
+
+            public int getControlsLength()
+            {
+                return 0;
+            }
+
+
+            public void setControlsLength( int controlsLength )
+            {
+            }
+
+
+            public int getMessageLength()
+            {
+                return 0;
+            }
+
+
+            public void setMessageLength( int messageLength )
+            {
+            }
+
+
+            public Control getControl( String oid )
+            {
+                return null;
+            }
+
+
+            public void setMessageId( int messageId )
+            {
+            }
+
+
+            public void addModification( EntryAttribute attr, ModificationOperation modOp )
+            {
+            }
+
+
+            public void replace( String attributeName )
+            {
+            }
+
+
+            public void replace( String attributeName, String... attributeValue )
+            {
+            }
+
+
+            public void replace( String attributeName, byte[]... attributeValue )
+            {
+            }
+
+
+            public void replace( EntryAttribute attr )
+            {
+            }
+
+
+            public void add( String attributeName, String... attributeValue )
+            {
+                // TODO Auto-generated method stub
+
+            }
+
+
+            public void add( String attributeName, byte[]... attributeValue )
+            {
+                // TODO Auto-generated method stub
+
+            }
+
+
+            public void add( EntryAttribute attr )
+            {
+                // TODO Auto-generated method stub
+
+            }
+
+
+            public void remove( String attributeName, String... attributeValue )
+            {
+                // TODO Auto-generated method stub
+
+            }
+
+
+            public void remove( String attributeName, byte[]... attributeValue )
+            {
+                // TODO Auto-generated method stub
+
+            }
+
+
+            public void remove( EntryAttribute attr )
+            {
+                // TODO Auto-generated method stub
+
+            }
         };
 
         ModifyRequestImpl req1 = getRequest();

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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -20,19 +20,17 @@
 package org.apache.directory.shared.ldap.message;
 
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import java.util.Collection;
 import java.util.Collections;
 
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
-import org.apache.directory.shared.ldap.message.ReferralImpl;
-import org.apache.directory.shared.ldap.message.internal.InternalReferral;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
 
 /**
  * Tests the ReferralImpl class.
@@ -194,7 +192,7 @@ public class ReferralImplTest
     @Test
     public void testEqualsDifferentImpls()
     {
-        InternalReferral refs0 = new InternalReferral()
+        Referral refs0 = new Referral()
         {
             public Collection<String> getLdapUrls()
             {
@@ -210,6 +208,28 @@ public class ReferralImplTest
             public void removeLdapUrl( String url )
             {
             }
+
+
+            public void addLdapUrlBytes( byte[] urlBytes )
+            {
+            }
+
+
+            public Collection<byte[]> getLdapUrlsBytes()
+            {
+                return null;
+            }
+
+
+            public int getReferralLength()
+            {
+                return 0;
+            }
+
+
+            public void setReferralLength( int referralLength )
+            {
+            }
         };
 
         ReferralImpl refs1 = new ReferralImpl();

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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -31,8 +31,6 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
-import org.apache.directory.shared.ldap.message.internal.InternalSearchResponseDone;
 import org.apache.directory.shared.ldap.name.DN;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -50,17 +48,18 @@ public class SearchResponseDoneImplTest
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
+
     /**
      * Creates and populates a SearchResponseDoneImpl stub for testing purposes.
      * 
      * @return a populated SearchResponseDoneImpl stub
      */
-    private SearchResponseDoneImpl createStub()
+    private SearchResultDoneImpl createStub()
     {
         // Construct the Search response to test with results and referrals
-        SearchResponseDoneImpl response = new SearchResponseDoneImpl( 45 );
-        InternalLdapResult result = response.getLdapResult();
-        
+        SearchResultDoneImpl response = new SearchResultDoneImpl( 45 );
+        LdapResult result = response.getLdapResult();
+
         try
         {
             result.setMatchedDn( new DN( "dc=example,dc=com" ) );
@@ -69,7 +68,7 @@ public class SearchResponseDoneImplTest
         {
             // do nothing
         }
-        
+
         result.setResultCode( ResultCodeEnum.SUCCESS );
         ReferralImpl refs = new ReferralImpl();
         refs.addLdapUrl( "ldap://someserver.com" );
@@ -86,7 +85,7 @@ public class SearchResponseDoneImplTest
     @Test
     public void testEqualsSameObj()
     {
-        SearchResponseDoneImpl resp = createStub();
+        SearchResultDoneImpl resp = createStub();
         assertTrue( resp.equals( resp ) );
     }
 
@@ -97,8 +96,8 @@ public class SearchResponseDoneImplTest
     @Test
     public void testEqualsExactCopy()
     {
-        SearchResponseDoneImpl resp0 = createStub();
-        SearchResponseDoneImpl resp1 = createStub();
+        SearchResultDoneImpl resp0 = createStub();
+        SearchResultDoneImpl resp1 = createStub();
         assertTrue( resp0.equals( resp1 ) );
         assertTrue( resp1.equals( resp0 ) );
     }
@@ -110,18 +109,18 @@ public class SearchResponseDoneImplTest
     @Test
     public void testEqualsDiffImpl()
     {
-        SearchResponseDoneImpl resp0 = createStub();
-        InternalSearchResponseDone resp1 = new InternalSearchResponseDone()
+        SearchResultDoneImpl resp0 = createStub();
+        SearchResultDone resp1 = new SearchResultDone()
         {
-            public InternalLdapResult getLdapResult()
+            public LdapResult getLdapResult()
             {
                 LdapResultImpl result = new LdapResultImpl();
-                
+
                 try
                 {
                     result.setMatchedDn( new DN( "dc=example,dc=com" ) );
                 }
-                catch ( Exception e ) 
+                catch ( Exception e )
                 {
                     // Do nothing
                 }
@@ -148,12 +147,12 @@ public class SearchResponseDoneImplTest
             }
 
 
-            public void add( Control a_control ) throws MessageException
+            public void addControl( Control a_control ) throws MessageException
             {
             }
 
 
-            public void remove( Control a_control ) throws MessageException
+            public void removeControl( Control a_control ) throws MessageException
             {
             }
 
@@ -176,7 +175,7 @@ public class SearchResponseDoneImplTest
             }
 
 
-            public void addAll( Control[] controls ) throws MessageException
+            public void addAllControls( Control[] controls ) throws MessageException
             {
             }
 
@@ -185,6 +184,45 @@ public class SearchResponseDoneImplTest
             {
                 return false;
             }
+
+
+            public Control getCurrentControl()
+            {
+                return null;
+            }
+
+
+            public int getControlsLength()
+            {
+                return 0;
+            }
+
+
+            public void setControlsLength( int controlsLength )
+            {
+            }
+
+
+            public int getMessageLength()
+            {
+                return 0;
+            }
+
+
+            public void setMessageLength( int messageLength )
+            {
+            }
+
+
+            public Control getControl( String oid )
+            {
+                return null;
+            }
+
+
+            public void setMessageId( int messageId )
+            {
+            }
         };
 
         assertTrue( resp0.equals( resp1 ) );
@@ -198,7 +236,7 @@ public class SearchResponseDoneImplTest
     @Test
     public void testHashCodeSameObj()
     {
-        SearchResponseDoneImpl resp = createStub();
+        SearchResultDoneImpl resp = createStub();
         assertTrue( resp.hashCode() == resp.hashCode() );
     }
 
@@ -209,8 +247,8 @@ public class SearchResponseDoneImplTest
     @Test
     public void testHashCodeExactCopy()
     {
-        SearchResponseDoneImpl resp0 = createStub();
-        SearchResponseDoneImpl resp1 = createStub();
+        SearchResultDoneImpl resp0 = createStub();
+        SearchResultDoneImpl resp1 = createStub();
         assertTrue( resp0.hashCode() == resp1.hashCode() );
     }
 
@@ -221,8 +259,8 @@ public class SearchResponseDoneImplTest
     @Test
     public void testNotEqualsDiffIds()
     {
-        SearchResponseDoneImpl resp0 = new SearchResponseDoneImpl( 3 );
-        SearchResponseDoneImpl resp1 = new SearchResponseDoneImpl( 4 );
+        SearchResultDoneImpl resp0 = new SearchResultDoneImpl( 3 );
+        SearchResultDoneImpl resp1 = new SearchResultDoneImpl( 4 );
 
         assertFalse( resp0.equals( resp1 ) );
         assertFalse( resp1.equals( resp0 ) );

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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -82,7 +82,7 @@ public class SearchResponseEntryImplTest
     @Test
     public void testEqualsSameObject()
     {
-        SearchResponseEntryImpl resp = new SearchResponseEntryImpl( 5 );
+        SearchResultEntryImpl resp = new SearchResultEntryImpl( 5 );
         assertTrue( "the same object should be equal", resp.equals( resp ) );
     }
 
@@ -93,11 +93,11 @@ public class SearchResponseEntryImplTest
     @Test
     public void testEqualsExactCopy() throws LdapException
     {
-        SearchResponseEntryImpl resp0 = new SearchResponseEntryImpl( 5 );
+        SearchResultEntryImpl resp0 = new SearchResultEntryImpl( 5 );
         resp0.setEntry( getEntry() );
         resp0.setObjectName( new DN( "dc=example,dc=com" ) );
 
-        SearchResponseEntryImpl resp1 = new SearchResponseEntryImpl( 5 );
+        SearchResultEntryImpl resp1 = new SearchResultEntryImpl( 5 );
         resp1.setEntry( getEntry() );
         resp1.setObjectName( new DN( "dc=example,dc=com" ) );
 
@@ -112,7 +112,7 @@ public class SearchResponseEntryImplTest
     @Test
     public void testHashCodeSameObject()
     {
-        SearchResponseEntryImpl resp = new SearchResponseEntryImpl( 5 );
+        SearchResultEntryImpl resp = new SearchResultEntryImpl( 5 );
         assertTrue( resp.hashCode() == resp.hashCode() );
     }
 
@@ -123,11 +123,11 @@ public class SearchResponseEntryImplTest
     @Test
     public void testHashCodeExactCopy() throws LdapException
     {
-        SearchResponseEntryImpl resp0 = new SearchResponseEntryImpl( 5 );
+        SearchResultEntryImpl resp0 = new SearchResultEntryImpl( 5 );
         resp0.setEntry( getEntry() );
         resp0.setObjectName( new DN( "dc=example,dc=com" ) );
 
-        SearchResponseEntryImpl resp1 = new SearchResponseEntryImpl( 5 );
+        SearchResultEntryImpl resp1 = new SearchResultEntryImpl( 5 );
         resp1.setEntry( getEntry() );
         resp1.setObjectName( new DN( "dc=example,dc=com" ) );
 
@@ -141,11 +141,11 @@ public class SearchResponseEntryImplTest
     @Test
     public void testNotEqualDiffObjectName() throws LdapException
     {
-        SearchResponseEntryImpl resp0 = new SearchResponseEntryImpl( 5 );
+        SearchResultEntryImpl resp0 = new SearchResultEntryImpl( 5 );
         resp0.setEntry( getEntry() );
         resp0.setObjectName( new DN( "dc=apache,dc=org" ) );
 
-        SearchResponseEntryImpl resp1 = new SearchResponseEntryImpl( 5 );
+        SearchResultEntryImpl resp1 = new SearchResultEntryImpl( 5 );
         resp1.setEntry( getEntry() );
         resp1.setObjectName( new DN( "dc=example,dc=com" ) );
 

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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -30,8 +30,6 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.message.internal.InternalReferral;
-import org.apache.directory.shared.ldap.message.internal.InternalSearchResponseReference;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -47,6 +45,7 @@ public class SearchResponseReferenceImpl
 {
     private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
+
     /**
      * Creates a baseline referral to test with and adds it to the supplied
      * response object.
@@ -55,7 +54,7 @@ public class SearchResponseReferenceImpl
      *            the parent lockable
      * @return the newly created referral for testing
      */
-    private InternalReferral getReferral( InternalSearchResponseReference resp )
+    private Referral getReferral( SearchResultReference resp )
     {
         ReferralImpl ref = new ReferralImpl();
         resp.setReferral( ref );
@@ -72,7 +71,7 @@ public class SearchResponseReferenceImpl
     @Test
     public void testEqualsSameObject()
     {
-        SearchResponseReferenceImpl resp = new SearchResponseReferenceImpl( 5 );
+        SearchResultReferenceImpl resp = new SearchResultReferenceImpl( 5 );
         getReferral( resp );
         assertTrue( "the same object should be equal", resp.equals( resp ) );
     }
@@ -84,9 +83,9 @@ public class SearchResponseReferenceImpl
     @Test
     public void testEqualsExactCopy()
     {
-        SearchResponseReferenceImpl resp0 = new SearchResponseReferenceImpl( 5 );
+        SearchResultReferenceImpl resp0 = new SearchResultReferenceImpl( 5 );
         getReferral( resp0 );
-        SearchResponseReferenceImpl resp1 = new SearchResponseReferenceImpl( 5 );
+        SearchResultReferenceImpl resp1 = new SearchResultReferenceImpl( 5 );
         getReferral( resp1 );
 
         assertTrue( "exact copies should be equal", resp0.equals( resp1 ) );
@@ -100,15 +99,15 @@ public class SearchResponseReferenceImpl
     @Test
     public void testEqualsDiffImpl()
     {
-        InternalSearchResponseReference resp0 = new InternalSearchResponseReference()
+        SearchResultReference resp0 = new SearchResultReference()
         {
-            public InternalReferral getReferral()
+            public Referral getReferral()
             {
                 return SearchResponseReferenceImplTest.this.getReferral( this );
             }
 
 
-            public void setReferral( InternalReferral a_referral )
+            public void setReferral( Referral referral )
             {
             }
 
@@ -125,12 +124,12 @@ public class SearchResponseReferenceImpl
             }
 
 
-            public void add( Control control ) throws MessageException
+            public void addControl( Control control ) throws MessageException
             {
             }
 
 
-            public void remove( Control control ) throws MessageException
+            public void removeControl( Control control ) throws MessageException
             {
             }
 
@@ -153,7 +152,7 @@ public class SearchResponseReferenceImpl
             }
 
 
-            public void addAll( Control[] controls ) throws MessageException
+            public void addAllControls( Control[] controls ) throws MessageException
             {
             }
 
@@ -162,9 +161,48 @@ public class SearchResponseReferenceImpl
             {
                 return false;
             }
+
+
+            public Control getCurrentControl()
+            {
+                return null;
+            }
+
+
+            public int getControlsLength()
+            {
+                return 0;
+            }
+
+
+            public void setControlsLength( int controlsLength )
+            {
+            }
+
+
+            public int getMessageLength()
+            {
+                return 0;
+            }
+
+
+            public void setMessageLength( int messageLength )
+            {
+            }
+
+
+            public Control getControl( String oid )
+            {
+                return null;
+            }
+
+
+            public void setMessageId( int messageId )
+            {
+            }
         };
 
-        SearchResponseReferenceImpl resp1 = new SearchResponseReferenceImpl( 5 );
+        SearchResultReferenceImpl resp1 = new SearchResultReferenceImpl( 5 );
         getReferral( resp1 );
 
         assertFalse( "using Object.equal() should NOT be equal", resp0.equals( resp1 ) );
@@ -178,7 +216,7 @@ public class SearchResponseReferenceImpl
     @Test
     public void testHashCodeSameObject()
     {
-        SearchResponseReferenceImpl resp = new SearchResponseReferenceImpl( 5 );
+        SearchResultReferenceImpl resp = new SearchResultReferenceImpl( 5 );
         getReferral( resp );
         assertTrue( resp.hashCode() == resp.hashCode() );
     }
@@ -190,9 +228,9 @@ public class SearchResponseReferenceImpl
     @Test
     public void testHashCodeExactCopy()
     {
-        SearchResponseReferenceImpl resp0 = new SearchResponseReferenceImpl( 5 );
+        SearchResultReferenceImpl resp0 = new SearchResultReferenceImpl( 5 );
         getReferral( resp0 );
-        SearchResponseReferenceImpl resp1 = new SearchResponseReferenceImpl( 5 );
+        SearchResultReferenceImpl resp1 = new SearchResultReferenceImpl( 5 );
         getReferral( resp1 );
 
         assertTrue( resp0.hashCode() == resp1.hashCode() );
@@ -205,9 +243,9 @@ public class SearchResponseReferenceImpl
     @Test
     public void testNotEqualDiffUrls()
     {
-        SearchResponseReferenceImpl resp0 = new SearchResponseReferenceImpl( 5 );
+        SearchResultReferenceImpl resp0 = new SearchResultReferenceImpl( 5 );
         getReferral( resp0 );
-        SearchResponseReferenceImpl resp1 = new SearchResponseReferenceImpl( 5 );
+        SearchResultReferenceImpl resp1 = new SearchResultReferenceImpl( 5 );
         getReferral( resp1 );
         resp1.getReferral().addLdapUrl( "ldap://asdf.com???" );
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java Fri Aug 20 19:23:27 2010
@@ -388,9 +388,9 @@ public class DNTest
     }
 
 
-   /**
-     * test a simple DN with a # on first position
-     */
+    /**
+      * test a simple DN with a # on first position
+      */
     @Test
     public void testDnSharpFirst() throws LdapException, LdapException
     {
@@ -1116,7 +1116,7 @@ public class DNTest
     public void testDnStartsWithNull() throws LdapException
     {
         DN dn = new DN( "a=b, c=d,e = f" );
-        assertEquals( true, dn.isChildOf( (DN)null ) );
+        assertEquals( true, dn.isChildOf( ( DN ) null ) );
     }
 
 
@@ -1194,7 +1194,7 @@ public class DNTest
     public void testDnEndsWithNull() throws LdapException
     {
         DN dn = new DN( "a=b, c=d,e = f" );
-        assertEquals( true, dn.hasSuffix( (DN)null ) );
+        assertEquals( true, dn.hasSuffix( ( DN ) null ) );
     }
 
 
@@ -1586,7 +1586,7 @@ public class DNTest
         DN name = DnParser.getNameParser().parse( dn );
 
         assertEquals( dn, ( name ).getName() );
-        assertEquals( "cn=Emmanuel  L\u00E9charny", (name).getNormName() );
+        assertEquals( "cn=Emmanuel  L\u00E9charny", ( name ).getNormName() );
     }
 
 
@@ -1966,7 +1966,8 @@ public class DNTest
     public void testIterator() throws Exception
     {
         DN dn = new DN( "cn=Airline,cn=Website,cn=HomeDir,cn=John,ou=Marketing,ou=West" );
-        String[] expected = new String[]{ "ou=West", "ou=Marketing", "cn=John", "cn=HomeDir", "cn=Website", "cn=Airline" };
+        String[] expected = new String[]
+            { "ou=West", "ou=Marketing", "cn=John", "cn=HomeDir", "cn=Website", "cn=Airline" };
         int count = 0;
 
         for ( RDN rdn : dn )
@@ -2013,7 +2014,8 @@ public class DNTest
     {
         DN dn = new DN( "cn=HomeDir,cn=John,ou=Marketing,ou=East" );
 
-        String[] expected = new String[]{ "cn=HomeDir", "cn=John", "ou=Marketing", "ou=East" };
+        String[] expected = new String[]
+            { "cn=HomeDir", "cn=John", "ou=Marketing", "ou=East" };
 
         int i = 0;
 
@@ -2507,7 +2509,7 @@ public class DNTest
 
         DN result = DN.normalize( name, oids );
 
-        assertTrue( (result).getNormName().equals( "ou=some people,dc=example,dc=com" ) );
+        assertTrue( ( result ).getNormName().equals( "ou=some people,dc=example,dc=com" ) );
     }
 
 
@@ -2563,7 +2565,7 @@ public class DNTest
         DN result = DN.normalize( name, oidOids );
 
         assertEquals(
-            (result).getNormName(),
+            ( result ).getNormName(),
             "0.9.2342.19200300.100.1.25=and some animals+2.5.4.11=some people,0.9.2342.19200300.100.1.25=example,0.9.2342.19200300.100.1.25=com" );
         assertTrue( ( result )
             .getName()
@@ -2666,7 +2668,7 @@ public class DNTest
      * Test for DIRSERVER-191
      */
     @Test
-    @Ignore( "from now onwards DN is not mutable" )
+    @Ignore("from now onwards DN is not mutable")
     public void testAddStringName() throws LdapException, InvalidNameException
     {
         LdapName jName = new LdapName( "cn=four,cn=three,cn=two,cn=one" );
@@ -2682,7 +2684,7 @@ public class DNTest
      * Test for DIRSERVER-191
      */
     @Test
-    @Ignore( "from now onwards DN is not mutable" )
+    @Ignore("from now onwards DN is not mutable")
     public void testAddIntString() throws LdapException, InvalidNameException
     {
         LdapName jName = new LdapName( "cn=four,cn=three,cn=two,cn=one" );
@@ -2706,7 +2708,7 @@ public class DNTest
      * Test for DIRSERVER-191
      */
     @Test
-    @Ignore( "from now onwards DN is not mutable" )
+    @Ignore("from now onwards DN is not mutable")
     public void testAddAllName() throws LdapException, InvalidNameException
     {
         LdapName jName = new LdapName( "cn=four,cn=three,cn=two,cn=one" );
@@ -2722,7 +2724,7 @@ public class DNTest
      * Test for DIRSERVER-191
      */
     @Test
-    @Ignore( "from now onwards DN is not mutable" )
+    @Ignore("from now onwards DN is not mutable")
     public void testAddAllIntName() throws LdapException, InvalidNameException
     {
         LdapName jName = new LdapName( "cn=four,cn=three,cn=two,cn=one" );
@@ -2751,10 +2753,10 @@ public class DNTest
         LdapName jName = new LdapName( "cn=four,cn=three,cn=two,cn=one" );
         DN aName = new DN( "cn=four,cn=three,cn=two,cn=one" );
 
-        assertEquals( jName.startsWith( new LdapName( "cn=seven,cn=six,cn=five" ) ), aName.isChildOf( new DN(
-            "cn=seven,cn=six,cn=five" ) ) );
-        assertEquals( jName.startsWith( new LdapName( "cn=three,cn=two,cn=one" ) ), aName.isChildOf( new DN(
-            "cn=three,cn=two,cn=one" ) ) );
+        assertEquals( jName.startsWith( new LdapName( "cn=seven,cn=six,cn=five" ) ),
+            aName.isChildOf( new DN( "cn=seven,cn=six,cn=five" ) ) );
+        assertEquals( jName.startsWith( new LdapName( "cn=three,cn=two,cn=one" ) ),
+            aName.isChildOf( new DN( "cn=three,cn=two,cn=one" ) ) );
     }
 
 
@@ -2769,12 +2771,12 @@ public class DNTest
         DN n10 = new DN( "cn=one,cn=zero" );
         DN n210 = new DN( "cn=two,cn=one,cn=zero" );
         DN n3210 = new DN( "cn=three,cn=two,cn=one,cn=zero" );
-        DN n321 =  new DN( "cn=three,cn=two,cn=one" );
-        DN n32 =  new DN( "cn=three,cn=two" );
-        DN n3 =  new DN( "cn=three" );
-        DN n21 =  new DN( "cn=two,cn=one" );
-        DN n2 =  new DN( "cn=two" );
-        DN n1 =  new DN( "cn=one" );
+        DN n321 = new DN( "cn=three,cn=two,cn=one" );
+        DN n32 = new DN( "cn=three,cn=two" );
+        DN n3 = new DN( "cn=three" );
+        DN n21 = new DN( "cn=two,cn=one" );
+        DN n2 = new DN( "cn=two" );
+        DN n1 = new DN( "cn=one" );
 
         assertTrue( n3210.hasSuffix( n3 ) );
         assertTrue( n3210.hasSuffix( n32 ) );
@@ -2796,7 +2798,7 @@ public class DNTest
      * Test for DIRSERVER-191
      */
     @Test
-    @Ignore( "from now onwards DN is not mutable" )
+    @Ignore("from now onwards DN is not mutable")
     public void testRemoveName() throws LdapException, InvalidNameException
     {
         LdapName jName = new LdapName( "cn=four,cn=three,cn=two,cn=one" );
@@ -2838,13 +2840,13 @@ public class DNTest
     {
         DN name1 = new DN( "cn=\"Kylie Minogue\",dc=example,dc=com" );
 
-        String[] expected = new String[]{ "cn=\"Kylie Minogue\"", "dc=example", "dc=com" };
+        String[] expected = new String[]
+            { "cn=\"Kylie Minogue\"", "dc=example", "dc=com" };
 
         List<RDN> j = name1.getRdns();
         int count = 0;
 
-
-        for ( RDN rdn:j )
+        for ( RDN rdn : j )
         {
             assertEquals( expected[count], rdn.getName() );
             count++;
@@ -3030,11 +3032,11 @@ public class DNTest
         DN name = new DN(
             "0.9.2342.19200300.100.1.1=00123456789+2.5.4.3=pablo picasso,2.5.4.11=search,2.5.4.10=imc,2.5.4.6=us" );
         assertEquals(
-            "0.9.2342.19200300.100.1.1=00123456789+2.5.4.3=pablo picasso,2.5.4.11=search,2.5.4.10=imc,2.5.4.6=us", name
-                .toString() );
+            "0.9.2342.19200300.100.1.1=00123456789+2.5.4.3=pablo picasso,2.5.4.11=search,2.5.4.10=imc,2.5.4.6=us",
+            name.toString() );
         assertEquals(
-            "0.9.2342.19200300.100.1.1=00123456789+2.5.4.3=pablo picasso,2.5.4.11=search,2.5.4.10=imc,2.5.4.6=us", name
-                .getName() );
+            "0.9.2342.19200300.100.1.1=00123456789+2.5.4.3=pablo picasso,2.5.4.11=search,2.5.4.10=imc,2.5.4.6=us",
+            name.getName() );
     }
 
 
@@ -3271,6 +3273,7 @@ public class DNTest
         assertEquals( dn, deserializeDN( serializeDN( dn ) ) );
     }
 
+
     @Test
     public void testCompositeRDN() throws LdapException
     {
@@ -3281,16 +3284,22 @@ public class DNTest
         assertEquals( "a=b+c=d+e=f,g=h", dn.toString() );
     }
 
+
     @Test
     public void testCompositeRDNOids() throws LdapException
     {
-        assertTrue( DN.isValid( "1.2.3.4.5=0+1.2.3.4.6=0+1.2.3.4.7=omnischmomni,2.5.4.3=subtree,0.9.2342.19200300.100.1.25=example,0.9.2342.19200300.100.1.25=com" ) );
+        assertTrue( DN
+            .isValid( "1.2.3.4.5=0+1.2.3.4.6=0+1.2.3.4.7=omnischmomni,2.5.4.3=subtree,0.9.2342.19200300.100.1.25=example,0.9.2342.19200300.100.1.25=com" ) );
 
-        DN dn = new DN( "1.2.3.4.5=0+1.2.3.4.6=0+1.2.3.4.7=omnischmomni,2.5.4.3=subtree,0.9.2342.19200300.100.1.25=example,0.9.2342.19200300.100.1.25=com" );
+        DN dn = new DN(
+            "1.2.3.4.5=0+1.2.3.4.6=0+1.2.3.4.7=omnischmomni,2.5.4.3=subtree,0.9.2342.19200300.100.1.25=example,0.9.2342.19200300.100.1.25=com" );
 
-        assertEquals( "1.2.3.4.5=0+1.2.3.4.6=0+1.2.3.4.7=omnischmomni,2.5.4.3=subtree,0.9.2342.19200300.100.1.25=example,0.9.2342.19200300.100.1.25=com", dn.toString() );
+        assertEquals(
+            "1.2.3.4.5=0+1.2.3.4.6=0+1.2.3.4.7=omnischmomni,2.5.4.3=subtree,0.9.2342.19200300.100.1.25=example,0.9.2342.19200300.100.1.25=com",
+            dn.toString() );
     }
 
+
     /**
      * Tests that AttributeTypeAndValues are correctly trimmed.
      */
@@ -3310,7 +3319,7 @@ public class DNTest
         AVA atav3 = dn3.getRdn().getAtav();
         assertEquals( "cn", atav3.getUpType() );
         assertEquals( "ABC", atav3.getUpValue().getString() );
-        assertTrue( Arrays.equals( StringTools.getBytesUtf8( "ABC" ),atav3.getNormValue().getBytes() ) );
+        assertTrue( Arrays.equals( StringTools.getBytesUtf8( "ABC" ), atav3.getNormValue().getBytes() ) );
 
         // antlr parser:
         DN dn4 = new DN( " cn = \\41\\42\\43 , ou=system " );
@@ -3669,7 +3678,8 @@ public class DNTest
         DN dn = new DN( "sn=joe+cn=doe,dc=apache,dc=org" );
         int count = 0;
 
-        String[] expected = new String[]{ "sn=joe+cn=doe", "dc=apache", "dc=org" };
+        String[] expected = new String[]
+            { "sn=joe+cn=doe", "dc=apache", "dc=org" };
 
         for ( RDN rdn : dn.getRdns() )
         {
@@ -3756,4 +3766,16 @@ public class DNTest
         dn = dn.remove( 0 );
         assertTrue( dn.isNormalized() );
     }
+
+
+    @Test
+    public void testParseDnWithSlash() throws Exception
+    {
+        String dnStr = "dc=/vehicles/v1/";
+
+        DN dn = new DN( dnStr );
+        dn.normalize( oids );
+
+        assertEquals( dnStr, dn.toString() );
+    }
 }

Modified: directory/shared/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/pom.xml?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/pom.xml (original)
+++ directory/shared/trunk/pom.xml Fri Aug 20 19:23:27 2010
@@ -84,7 +84,7 @@
     <module>asn1-codec</module>
     <module>ldap-convert</module>
     <module>cursor</module>
-    <module>dsml-parser</module>
+    <!-- module>dsml-parser</module -->
   </modules>
 
   <build>



Mime
View raw message