directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1061416 [4/6] - in /directory: apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/ apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/ apacheds/trunk/core-integ/src/test/j...
Date Thu, 20 Jan 2011 17:49:55 GMT
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java Thu Jan 20 17:49:48 2011
@@ -47,6 +47,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.normalizers.NoOpNormalizer;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -704,7 +705,7 @@ public final class AttributeUtils
 
                             sb.append( tabs ).append( "        Val[" ).append( j ).append( "] : " );
                             sb.append( string ).append( '/' );
-                            sb.append( StringTools.dumpBytes( ( byte[] ) attr ) );
+                            sb.append( Strings.dumpBytes((byte[]) attr) );
                             sb.append( " \n" );
                         }
                         else

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java Thu Jan 20 17:49:48 2011
@@ -41,6 +41,7 @@ import org.apache.directory.shared.i18n.
 import org.apache.directory.shared.ldap.entry.BinaryValue;
 import org.apache.directory.shared.ldap.entry.StringValue;
 import org.apache.directory.shared.ldap.schema.syntaxCheckers.UuidSyntaxChecker;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -989,30 +990,6 @@ public final class StringTools
 
 
     /**
-     * Helper function that dump an array of bytes in hex form
-     * 
-     * @param buffer The bytes array to dump
-     * @return A string representation of the array of bytes
-     */
-    public static String dumpBytes( byte[] buffer )
-    {
-        if ( buffer == null )
-        {
-            return "";
-        }
-
-        StringBuffer sb = new StringBuffer();
-
-        for ( int i = 0; i < buffer.length; i++ )
-        {
-            sb.append( "0x" ).append( ( char ) ( HEX_CHAR[( buffer[i] & 0x00F0 ) >> 4] ) ).append(
-                ( char ) ( HEX_CHAR[buffer[i] & 0x000F] ) ).append( " " );
-        }
-
-        return sb.toString();
-    }
-
-    /**
      * 
      * Helper method to render an object which can be a String or a byte[]
      *
@@ -1028,7 +1005,7 @@ public final class StringTools
             }
             else if ( object instanceof byte[] )
             {
-                return dumpBytes( ( byte[] ) object );
+                return Strings.dumpBytes((byte[]) object);
             }
             else if ( object instanceof StringValue )
             {
@@ -1036,7 +1013,7 @@ public final class StringTools
             }
             else if ( object instanceof BinaryValue )
             {
-                return dumpBytes( ( ( BinaryValue ) object ).get() );
+                return Strings.dumpBytes(((BinaryValue) object).get());
             }
             else
             {

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java Thu Jan 20 17:49:48 2011
@@ -38,7 +38,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.AbandonRequestImpl;
 import org.apache.directory.shared.ldap.message.LdapEncoder;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -117,25 +117,25 @@ public class LdapControlTest
 
         Control control = controls.get( "1.3.6.1.5.5.1" );
         assertEquals( "1.3.6.1.5.5.1", control.getOid() );
-        assertEquals( "0x61 0x62 0x63 0x64 0x65 0x66 ", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "0x61 0x62 0x63 0x64 0x65 0x66 ", Strings.dumpBytes((byte[]) control.getValue()) );
         assertTrue( control.isCritical() );
         internalAbandonRequest.addControl( control );
 
         control = controls.get( "1.3.6.1.5.5.2" );
         assertEquals( "1.3.6.1.5.5.2", control.getOid() );
-        assertEquals( "0x67 0x68 0x69 0x6A 0x6B 0x6C ", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "0x67 0x68 0x69 0x6A 0x6B 0x6C ", Strings.dumpBytes((byte[]) control.getValue()) );
         assertFalse( control.isCritical() );
         internalAbandonRequest.addControl( control );
 
         control = controls.get( "1.3.6.1.5.5.3" );
         assertEquals( "1.3.6.1.5.5.3", control.getOid() );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
         assertTrue( control.isCritical() );
         internalAbandonRequest.addControl( control );
 
         control = controls.get( "1.3.6.1.5.5.4" );
         assertEquals( "1.3.6.1.5.5.4", control.getOid() );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
         assertFalse( control.isCritical() );
         internalAbandonRequest.addControl( control );
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java Thu Jan 20 17:49:48 2011
@@ -36,7 +36,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.Message;
 import org.apache.directory.shared.ldap.message.UnbindRequest;
 import org.apache.directory.shared.ldap.message.UnbindRequestImpl;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -296,7 +296,7 @@ public class LdapMessageTest
             // UnbindRequest ::= [APPLICATION 2] NULL
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -326,7 +326,7 @@ public class LdapMessageTest
             // Check the length
             assertEquals( 0x08, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java Thu Jan 20 17:49:48 2011
@@ -38,7 +38,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.LdapEncoder;
 import org.apache.directory.shared.ldap.message.Referral;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -273,7 +273,7 @@ public class LdapResultTest
                 0x04, 0x00 // Empty errorMessage
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -305,7 +305,7 @@ public class LdapResultTest
             // Check the length
             assertEquals( 0x0E, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -336,7 +336,7 @@ public class LdapResultTest
                 0x04, 0x00, // Empty errorMessage
                 ( byte ) 0xA3, 0x0A, 0x04, 0x08, 'l', 'd', 'a', 'p', ':', '/', '/', '/' } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -376,7 +376,7 @@ public class LdapResultTest
             // Check the length
             assertEquals( 0x1A, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -414,7 +414,7 @@ public class LdapResultTest
                 ( byte ) 0xA3, 0x14, 0x04, 0x08, 'l', 'd', 'a', 'p', ':', '/', '/', '/', 0x04, 0x08, 'l', 'd', 'a',
                 'p', ':', '/', '/', '/' } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -459,7 +459,7 @@ public class LdapResultTest
             // Check the length
             assertEquals( 0x24, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -491,7 +491,7 @@ public class LdapResultTest
                 0x04, 0x00, // Empty errorMessage
                 ( byte ) 0xA3, 0x0C, 0x04, 0x08, 'l', 'd', 'a', 'p', ':', '/', '/', '/', 0x04, 0x00 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -541,7 +541,7 @@ public class LdapResultTest
             // Check the length
             assertEquals( 0x1C, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java Thu Jan 20 17:49:48 2011
@@ -39,7 +39,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.AbandonRequestImpl;
 import org.apache.directory.shared.ldap.message.LdapEncoder;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -123,25 +123,25 @@ public class AbandonRequestTest
 
         Control control = controls.get( "1.3.6.1.5.5.1" );
         assertEquals( "1.3.6.1.5.5.1", control.getOid() );
-        assertEquals( "0x61 0x62 0x63 0x64 0x65 0x66 ", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "0x61 0x62 0x63 0x64 0x65 0x66 ", Strings.dumpBytes((byte[]) control.getValue()) );
         assertTrue( control.isCritical() );
         internalAbandonRequest.addControl( control );
 
         control = controls.get( "1.3.6.1.5.5.2" );
         assertEquals( "1.3.6.1.5.5.2", control.getOid() );
-        assertEquals( "0x67 0x68 0x69 0x6A 0x6B 0x6C ", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "0x67 0x68 0x69 0x6A 0x6B 0x6C ", Strings.dumpBytes((byte[]) control.getValue()) );
         assertFalse( control.isCritical() );
         internalAbandonRequest.addControl( control );
 
         control = controls.get( "1.3.6.1.5.5.3" );
         assertEquals( "1.3.6.1.5.5.3", control.getOid() );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
         assertTrue( control.isCritical() );
         internalAbandonRequest.addControl( control );
 
         control = controls.get( "1.3.6.1.5.5.4" );
         assertEquals( "1.3.6.1.5.5.4", control.getOid() );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
         assertFalse( control.isCritical() );
         internalAbandonRequest.addControl( control );
 
@@ -195,7 +195,7 @@ public class AbandonRequestTest
             // AbandonRequest ::= [APPLICATION 16] MessageID
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessageContainer Container
@@ -230,7 +230,7 @@ public class AbandonRequestTest
             // Check the length
             assertEquals( 0x0A, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java Thu Jan 20 17:49:48 2011
@@ -49,7 +49,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.Message;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -114,7 +114,7 @@ public class AddRequestTest
                 0x04, 0x05, 't', 'e', 's', 't', '1', 0x04, 0x05, 't', 'e', 's', 't', '2', 0x04, 0x05, 't', 'e', 's',
                 't', '3', } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -653,7 +653,7 @@ public class AddRequestTest
                 0x04, 0x01, 'l', // type AttributeDescription,
                 0x31, 0x02, 0x04, 0x00 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -697,7 +697,7 @@ public class AddRequestTest
             // Check the length
             assertEquals( 0x34, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -745,7 +745,7 @@ public class AddRequestTest
                 0x30, 0x19, 0x04, 0x17, 0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 0x2E, 0x31, 0x2E, 0x31, 0x31,
                 0x33, 0x37, 0x33, 0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -790,7 +790,7 @@ public class AddRequestTest
 
         Control control = controls.get( "2.16.840.1.113730.3.4.2" );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
 
         // Check the encoding
         try
@@ -800,7 +800,7 @@ public class AddRequestTest
             // Check the length
             assertEquals( 0x51, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddResponseTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddResponseTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddResponseTest.java Thu Jan 20 17:49:48 2011
@@ -38,7 +38,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.LdapEncoder;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -79,7 +79,7 @@ public class AddResponseTest
             // }
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -111,7 +111,7 @@ public class AddResponseTest
             // Check the length
             assertEquals( 0x0E, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -194,7 +194,7 @@ public class AddResponseTest
                 0x30, 0x19, 0x04, 0x17, 0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 0x2E, 0x31, 0x2E, 0x31, 0x31,
                 0x33, 0x37, 0x33, 0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -226,7 +226,7 @@ public class AddResponseTest
 
         Control control = controls.get( "2.16.840.1.113730.3.4.2" );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
 
         try
         {
@@ -236,7 +236,7 @@ public class AddResponseTest
             // Check the length
             assertEquals( 0x02B, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java Thu Jan 20 17:49:48 2011
@@ -41,6 +41,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -94,7 +95,7 @@ public class BindRequestPerfTest
                 0x30, 0x19, 0x04, 0x17, 0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 0x2E, 0x31, 0x2E, 0x31, 0x31,
                 0x33, 0x37, 0x33, 0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -141,7 +142,7 @@ public class BindRequestPerfTest
 
         Control control = controls.get( "2.16.840.1.113730.3.4.2" );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
 
         // Check the encoding
         try
@@ -151,7 +152,7 @@ public class BindRequestPerfTest
             // Check the length
             assertEquals( 0x52, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java Thu Jan 20 17:49:48 2011
@@ -43,6 +43,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -185,7 +186,7 @@ public class BindRequestTest
                 // ...
                 'p', 'a', 's', 's', 'w', 'o', 'r', 'd' } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -219,7 +220,7 @@ public class BindRequestTest
             // Check the length
             assertEquals( 0x35, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -346,7 +347,7 @@ public class BindRequestTest
                 // ...
                 'p', 'a', 's', 's', 'w', 'o', 'r', 'd' } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
 
         stream.flip();
 
@@ -381,7 +382,7 @@ public class BindRequestTest
             // Check the length
             assertEquals( 0x16, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -424,7 +425,7 @@ public class BindRequestTest
                 // ...
                 0x04, 0x0B, 'K', 'E', 'R', 'B', 'E', 'R', 'O', 'S', '_', 'V', '4' } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -458,7 +459,7 @@ public class BindRequestTest
             // Check the length
             assertEquals( 0x3A, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -506,7 +507,7 @@ public class BindRequestTest
                 // 
                 'a', 'b', 'c', 'd', 'e', 'f' } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -541,7 +542,7 @@ public class BindRequestTest
             // Check the length
             assertEquals( 0x42, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -583,7 +584,7 @@ public class BindRequestTest
                 // 
                 'a', 'b', 'c', 'd', 'e', 'f' } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -618,7 +619,7 @@ public class BindRequestTest
             // Check the length
             assertEquals( 0x23, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -897,7 +898,7 @@ public class BindRequestTest
                 0x02, 0x01, 0x03, // version INTEGER (1..127),
                 0x04, 0x00, ( byte ) 0x80, 0x00 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -931,7 +932,7 @@ public class BindRequestTest
             // Check the length
             assertEquals( 0x0E, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -999,7 +1000,7 @@ public class BindRequestTest
                 0x02, 0x01, 0x03, // version INTEGER (1..127),
                 0x04, 0x00, ( byte ) 0xA3, 0x02, 0x04, 0x00 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -1033,7 +1034,7 @@ public class BindRequestTest
             // Check the length
             assertEquals( 0x10, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -1105,7 +1106,7 @@ public class BindRequestTest
                 0x02, 0x01, 0x03, // version INTEGER (1..127),
                 0x04, 0x00, ( byte ) 0xA3, 0x04, 0x04, 0x00, 0x04, 0x00, } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -1140,7 +1141,7 @@ public class BindRequestTest
             // Check the length
             assertEquals( 0x12, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -1176,7 +1177,7 @@ public class BindRequestTest
                 0x30, 0x19, 0x04, 0x17, 0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 0x2E, 0x31, 0x2E, 0x31, 0x31,
                 0x33, 0x37, 0x33, 0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -1210,7 +1211,7 @@ public class BindRequestTest
 
         Control control = controls.get( "2.16.840.1.113730.3.4.2" );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
 
         // Check the encoding
         try
@@ -1220,7 +1221,7 @@ public class BindRequestTest
             // Check the length
             assertEquals( 0x2F, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -1255,7 +1256,7 @@ public class BindRequestTest
                 0x30, 0x19, 0x04, 0x17, 0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 0x2E, 0x31, 0x2E, 0x31, 0x31,
                 0x33, 0x37, 0x33, 0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -1289,7 +1290,7 @@ public class BindRequestTest
 
         Control control = controls.get( "2.16.840.1.113730.3.4.2" );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
 
         // Check the encoding
         try
@@ -1299,7 +1300,7 @@ public class BindRequestTest
             // Check the length
             assertEquals( 0x2D, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java Thu Jan 20 17:49:48 2011
@@ -41,6 +41,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -82,7 +83,7 @@ public class BindResponseTest
             // serverSaslCreds [7] OCTET STRING OPTIONAL }
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -115,7 +116,7 @@ public class BindResponseTest
             // Check the length
             assertEquals( 0x0E, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -171,7 +172,7 @@ public class BindResponseTest
                 0x04, 0x0D, 0x30, 0x0B, 0x02, 0x01, 0x05, // Size = 5, cookie = "abcdef" 
                 0x04, 0x06, 'a', 'b', 'c', 'd', 'e', 'f' } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -218,7 +219,7 @@ public class BindResponseTest
             // Check the length
             assertEquals( 0x3C, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -257,7 +258,7 @@ public class BindResponseTest
             // }
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -291,7 +292,7 @@ public class BindResponseTest
             // Check the length
             assertEquals( 0x10, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -343,7 +344,7 @@ public class BindResponseTest
                 0x30, 0x19, 0x04, 0x17, 0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 0x2E, 0x31, 0x2E, 0x31, 0x31,
                 0x33, 0x37, 0x33, 0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -376,7 +377,7 @@ public class BindResponseTest
 
         Control control = controls.get( "2.16.840.1.113730.3.4.2" );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
 
         // Check the encoding
         try
@@ -386,7 +387,7 @@ public class BindResponseTest
             // Check the length
             assertEquals( 0x2D, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -425,7 +426,7 @@ public class BindResponseTest
             // STRING OPTIONAL }
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -459,7 +460,7 @@ public class BindResponseTest
             // Check the length
             assertEquals( 0x12, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java Thu Jan 20 17:49:48 2011
@@ -41,7 +41,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.Message;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -87,7 +87,7 @@ public class CompareRequestTest
                 // assertionValue AssertionValue }
                 0x04, 0x05, 'v', 'a', 'l', 'u', 'e' } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -120,7 +120,7 @@ public class CompareRequestTest
             // Check the length
             assertEquals( 0x38, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -375,7 +375,7 @@ public class CompareRequestTest
                 // assertionValue AssertionValue }
                 0x04, 0x00 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -408,7 +408,7 @@ public class CompareRequestTest
             // Check the length
             assertEquals( 0x33, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -454,7 +454,7 @@ public class CompareRequestTest
                 0x30, 0x19, 0x04, 0x17, 0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 0x2E, 0x31, 0x2E, 0x31, 0x31,
                 0x33, 0x37, 0x33, 0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -486,7 +486,7 @@ public class CompareRequestTest
 
         Control control = controls.get( "2.16.840.1.113730.3.4.2" );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
 
         // Check the encoding
         try
@@ -496,7 +496,7 @@ public class CompareRequestTest
             // Check the length
             assertEquals( 0x55, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java Thu Jan 20 17:49:48 2011
@@ -38,7 +38,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.LdapEncoder;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -82,7 +82,7 @@ public class CompareResponseTest
             // }
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -115,7 +115,7 @@ public class CompareResponseTest
             // Check the length
             assertEquals( 0x0E, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -164,7 +164,7 @@ public class CompareResponseTest
                 0x30, 0x19, 0x04, 0x17, 0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 0x2E, 0x31, 0x2E, 0x31, 0x31,
                 0x33, 0x37, 0x33, 0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -196,7 +196,7 @@ public class CompareResponseTest
 
         Control control = controls.get( "2.16.840.1.113730.3.4.2" );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
 
         // Check the encoding
         try
@@ -206,7 +206,7 @@ public class CompareResponseTest
             // Check the length
             assertEquals( 0x2B, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlTest.java Thu Jan 20 17:49:48 2011
@@ -27,8 +27,7 @@ import static org.junit.Assert.assertNot
 import java.nio.ByteBuffer;
 
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.ldap.util.StringTools;
-import org.junit.Ignore;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 
 
@@ -83,7 +82,7 @@ public class PasswordPolicyResponseContr
         buffer.flip();
         
         ByteBuffer encoded = control.encode( ByteBuffer.allocate( control.computeLength() ) );
-        assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+        assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
     }
     
 
@@ -129,7 +128,7 @@ public class PasswordPolicyResponseContr
         buffer.flip();
         
         ByteBuffer encoded = control.encode( ByteBuffer.allocate( control.computeLength() ) );
-        assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+        assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
     }
 
     
@@ -172,7 +171,7 @@ public class PasswordPolicyResponseContr
         buffer.flip();
         
         ByteBuffer encoded = control.encode( ByteBuffer.allocate( control.computeLength() ) );
-        assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+        assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
     }
     
 
@@ -215,7 +214,7 @@ public class PasswordPolicyResponseContr
         buffer.flip();
         
         ByteBuffer encoded = control.encode( ByteBuffer.allocate( control.computeLength() ) );
-        assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+        assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
     }
     
     
@@ -256,7 +255,7 @@ public class PasswordPolicyResponseContr
         buffer.flip();
         
         ByteBuffer encoded = control.encode( ByteBuffer.allocate( control.computeLength() ) );
-        assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+        assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
     }
 
     
@@ -293,6 +292,6 @@ public class PasswordPolicyResponseContr
         buffer.flip();
         
         ByteBuffer encoded = control.encode( ByteBuffer.allocate( control.computeLength() ) );
-        assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+        assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
     }
 }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncDoneValueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncDoneValueControlTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncDoneValueControlTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncDoneValueControlTest.java Thu Jan 20 17:49:48 2011
@@ -36,6 +36,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.SyncDoneValueControlContainer;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.SyncDoneValueControlDecoder;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -102,8 +103,8 @@ public class SyncDoneValueControlTest
             buffer.flip();
 
             bb = control.encode( ByteBuffer.allocate( control.computeLength() ) );
-            String expected = StringTools.dumpBytes( buffer.array() );
-            String decoded = StringTools.dumpBytes( bb.array() );
+            String expected = Strings.dumpBytes(buffer.array());
+            String decoded = Strings.dumpBytes(bb.array());
             assertEquals( expected, decoded );
         }
         catch( EncoderException e )
@@ -163,8 +164,8 @@ public class SyncDoneValueControlTest
             buffer.flip();
 
             bb = control.encode( ByteBuffer.allocate( control.computeLength() ) );
-            String expected = StringTools.dumpBytes( buffer.array() );
-            String decoded = StringTools.dumpBytes( bb.array() );
+            String expected = Strings.dumpBytes(buffer.array());
+            String decoded = Strings.dumpBytes(bb.array());
             assertEquals( expected, decoded );
         }
         catch( EncoderException e )
@@ -254,8 +255,8 @@ public class SyncDoneValueControlTest
             buffer.flip();
 
             bb = control.encode( ByteBuffer.allocate( control.computeLength() ) );
-            String expected = StringTools.dumpBytes( buffer.array() );
-            String decoded = StringTools.dumpBytes( bb.array() );
+            String expected = Strings.dumpBytes(buffer.array());
+            String decoded = Strings.dumpBytes(bb.array());
             assertEquals( expected, decoded );
         }
         catch( Exception e )

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncInfoValueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncInfoValueControlTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncInfoValueControlTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncInfoValueControlTest.java Thu Jan 20 17:49:48 2011
@@ -36,6 +36,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue.SyncInfoValueControlDecoder;
 import org.apache.directory.shared.ldap.message.control.replication.SynchronizationInfoEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -101,7 +102,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -159,7 +160,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -226,7 +227,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -291,7 +292,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -354,7 +355,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -417,7 +418,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -476,7 +477,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -543,7 +544,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -608,7 +609,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -671,7 +672,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -734,7 +735,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -793,7 +794,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -987,7 +988,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -1078,7 +1079,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -1143,7 +1144,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -1237,7 +1238,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -1302,7 +1303,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -1395,7 +1396,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -1462,7 +1463,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -1558,7 +1559,7 @@ public class SyncInfoValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncInfoValue.encode( ByteBuffer.allocate( syncInfoValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncModifyDnControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncModifyDnControlTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncModifyDnControlTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncModifyDnControlTest.java Thu Jan 20 17:49:48 2011
@@ -35,7 +35,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.ldap.codec.controls.replication.syncmodifydn.SyncModifyDnControl;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncmodifydn.SyncModifyDnControlContainer;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncmodifydn.SyncModifyDnControlDecoder;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -102,7 +102,7 @@ public class SyncModifyDnControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncmodDnControl.encode( ByteBuffer.allocate( syncmodDnControl.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
                 }
         catch ( EncoderException ee )
         {
@@ -166,7 +166,7 @@ public class SyncModifyDnControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncmodDnControl.encode( ByteBuffer.allocate( syncmodDnControl.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
                 }
         catch ( EncoderException ee )
         {
@@ -233,7 +233,7 @@ public class SyncModifyDnControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncmodDnControl.encode( ByteBuffer.allocate( syncmodDnControl.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
                 }
         catch ( EncoderException ee )
         {

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncRequestValueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncRequestValueControlTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncRequestValueControlTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncRequestValueControlTest.java Thu Jan 20 17:49:48 2011
@@ -36,6 +36,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.controls.replication.syncRequestValue.SyncRequestValueControlDecoder;
 import org.apache.directory.shared.ldap.message.control.replication.SynchronizationModeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -106,8 +107,8 @@ public class SyncRequestValueControlTest
             buffer.flip();
 
             bb = syncRequestValue.encode( ByteBuffer.allocate( syncRequestValue.computeLength() ) );
-            String decoded = StringTools.dumpBytes( bb.array() );
-            String expected = StringTools.dumpBytes( buffer.array() );
+            String decoded = Strings.dumpBytes(bb.array());
+            String expected = Strings.dumpBytes(buffer.array());
             assertEquals( expected, decoded );
         }
         catch ( EncoderException ee )
@@ -175,8 +176,8 @@ public class SyncRequestValueControlTest
             buffer.flip();
 
             bb = syncRequestValue.encode( ByteBuffer.allocate( syncRequestValue.computeLength() ) );
-            String decoded = StringTools.dumpBytes( bb.array() );
-            String expected = StringTools.dumpBytes( buffer.array() );
+            String decoded = Strings.dumpBytes(bb.array());
+            String expected = Strings.dumpBytes(buffer.array());
             assertEquals( expected, decoded );
         }
         catch ( EncoderException ee )
@@ -242,8 +243,8 @@ public class SyncRequestValueControlTest
             buffer.flip();
 
             bb = syncRequestValue.encode( ByteBuffer.allocate( syncRequestValue.computeLength() ) );
-            String decoded = StringTools.dumpBytes( bb.array() );
-            String expected = StringTools.dumpBytes( buffer.array() );
+            String decoded = Strings.dumpBytes(bb.array());
+            String expected = Strings.dumpBytes(buffer.array());
             assertEquals( expected, decoded );
         }
         catch ( EncoderException ee )
@@ -311,8 +312,8 @@ public class SyncRequestValueControlTest
             buffer.flip();
 
             bb = syncRequestValue.encode( ByteBuffer.allocate( syncRequestValue.computeLength() ) );
-            String decoded = StringTools.dumpBytes( bb.array() );
-            String expected = StringTools.dumpBytes( buffer.array() );
+            String decoded = Strings.dumpBytes(bb.array());
+            String expected = Strings.dumpBytes(buffer.array());
             assertEquals( expected, decoded );
         }
         catch ( EncoderException ee )
@@ -378,8 +379,8 @@ public class SyncRequestValueControlTest
             buffer.flip();
 
             bb = syncRequestValue.encode( ByteBuffer.allocate( syncRequestValue.computeLength() ) );
-            String decoded = StringTools.dumpBytes( bb.array() );
-            String expected = StringTools.dumpBytes( buffer.array() );
+            String decoded = Strings.dumpBytes(bb.array());
+            String expected = Strings.dumpBytes(buffer.array());
             assertEquals( expected, decoded );
         }
         catch ( EncoderException ee )
@@ -446,8 +447,8 @@ public class SyncRequestValueControlTest
             buffer.flip();
 
             bb = syncRequestValue.encode( ByteBuffer.allocate( syncRequestValue.computeLength() ) );
-            String decoded = StringTools.dumpBytes( bb.array() );
-            String expected = StringTools.dumpBytes( buffer.array() );
+            String decoded = Strings.dumpBytes(bb.array());
+            String expected = Strings.dumpBytes(buffer.array());
             assertEquals( expected, decoded );
         }
         catch ( EncoderException ee )
@@ -513,8 +514,8 @@ public class SyncRequestValueControlTest
             buffer.flip();
 
             bb = syncRequestValue.encode( ByteBuffer.allocate( syncRequestValue.computeLength() ) );
-            String decoded = StringTools.dumpBytes( bb.array() );
-            String expected = StringTools.dumpBytes( buffer.array() );
+            String decoded = Strings.dumpBytes(bb.array());
+            String expected = Strings.dumpBytes(buffer.array());
             assertEquals( expected, decoded );
         }
         catch ( EncoderException ee )

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncStateValueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncStateValueControlTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncStateValueControlTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncStateValueControlTest.java Thu Jan 20 17:49:48 2011
@@ -37,6 +37,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.controls.replication.syncStateValue.SyncStateValueControlDecoder;
 import org.apache.directory.shared.ldap.message.control.replication.SyncStateTypeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -109,7 +110,7 @@ public class SyncStateValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncStateValue.encode( ByteBuffer.allocate( syncStateValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -173,7 +174,7 @@ public class SyncStateValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncStateValue.encode( ByteBuffer.allocate( syncStateValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -239,7 +240,7 @@ public class SyncStateValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncStateValue.encode( ByteBuffer.allocate( syncStateValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {
@@ -396,7 +397,7 @@ public class SyncStateValueControlTest
             buffer.flip();
 
             ByteBuffer encoded = syncStateValue.encode( ByteBuffer.allocate( syncStateValue.computeLength() ) );
-            assertEquals( StringTools.dumpBytes( buffer.array() ), StringTools.dumpBytes( encoded.array() ) );
+            assertEquals( Strings.dumpBytes(buffer.array()), Strings.dumpBytes(encoded.array()) );
         }
         catch ( EncoderException ee )
         {

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java Thu Jan 20 17:49:48 2011
@@ -42,7 +42,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.Message;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -81,7 +81,7 @@ public class DelRequestTest
                 0x4A, 0x20, 'c', 'n', '=', 't', 'e', 's', 't', 'M', 'o', 'd', 'i', 'f', 'y', ',', 'o', 'u', '=', 'u',
                 's', 'e', 'r', 's', ',', 'o', 'u', '=', 's', 'y', 's', 't', 'e', 'm' } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -116,7 +116,7 @@ public class DelRequestTest
             // Check the length
             assertEquals( 0x27, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -234,7 +234,7 @@ public class DelRequestTest
                 0x30, 0x19, 0x04, 0x17, 0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 0x2E, 0x31, 0x2E, 0x31, 0x31,
                 0x33, 0x37, 0x33, 0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -264,7 +264,7 @@ public class DelRequestTest
 
         Control control = controls.get( "2.16.840.1.113730.3.4.2" );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
 
         DeleteRequest internalDeleteRequest = new DeleteRequestImpl( delRequest.getMessageId() );
         internalDeleteRequest.setName( delRequest.getName() );
@@ -278,7 +278,7 @@ public class DelRequestTest
             // Check the length
             assertEquals( 0x44, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java Thu Jan 20 17:49:48 2011
@@ -38,7 +38,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.LdapEncoder;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -89,7 +89,7 @@ public class DelResponseTest
             // }
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -122,7 +122,7 @@ public class DelResponseTest
             // Check the length
             assertEquals( 0x2D, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -213,7 +213,7 @@ public class DelResponseTest
 
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -245,7 +245,7 @@ public class DelResponseTest
 
         Control control = controls.get( "2.16.840.1.113730.3.4.2" );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
 
         // Check the encoding
         try
@@ -255,7 +255,7 @@ public class DelResponseTest
             // Check the length
             assertEquals( 0x4A, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java?rev=1061416&r1=1061415&r2=1061416&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java Thu Jan 20 17:49:48 2011
@@ -38,6 +38,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.LdapEncoder;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -75,7 +76,7 @@ public class ExtendedRequestTest
                 // requestValue [1] OCTET STRING OPTIONAL }
                 ( byte ) 0x81, 0x05, 'v', 'a', 'l', 'u', 'e' } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -108,7 +109,7 @@ public class ExtendedRequestTest
             // Check the length
             assertEquals( 0x1D, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -146,7 +147,7 @@ public class ExtendedRequestTest
                 0x30, 0x19, 0x04, 0x17, '2', '.', '1', '6', '.', '8', '4', '0', '.', '1', '.', '1', '1', '3', '7', '3',
                 '0', '.', '3', '.', '4', '.', '2' } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -178,7 +179,7 @@ public class ExtendedRequestTest
         assertTrue( extendedRequest.hasControl( "2.16.840.1.113730.3.4.2" ) );
 
         Control control = extendedRequest.getControl( "2.16.840.1.113730.3.4.2" );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
 
         // Check the encoding
         try
@@ -188,7 +189,7 @@ public class ExtendedRequestTest
             // Check the length
             assertEquals( 0x3A, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -227,7 +228,7 @@ public class ExtendedRequestTest
                 0x30, 0x19, 0x04, 0x17, '2', '.', '1', '6', '.', '8', '4', '0', '.', '1', '.', '1', '1', '3', '7', '3',
                 '0', '.', '3', '.', '4', '.', '2' } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -260,7 +261,7 @@ public class ExtendedRequestTest
         assertTrue( extendedRequest.hasControl( "2.16.840.1.113730.3.4.2" ) );
 
         Control control = extendedRequest.getControl( "2.16.840.1.113730.3.4.2" );
-        assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
+        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
 
         // Check the encoding
         try
@@ -270,7 +271,7 @@ public class ExtendedRequestTest
             // Check the length
             assertEquals( 0x33, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -406,7 +407,7 @@ public class ExtendedRequestTest
                 // requestName [0] LDAPOID,
                 ( byte ) 0x80, 0x0D, '1', '.', '3', '.', '6', '.', '1', '.', '5', '.', '5', '.', '2', } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -438,7 +439,7 @@ public class ExtendedRequestTest
             // Check the length
             assertEquals( 0x16, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -472,7 +473,7 @@ public class ExtendedRequestTest
                 ( byte ) 0x80, 0x0D, '1', '.', '3', '.', '6', '.', '1', '.', '5', '.', '5', '.', '2', ( byte ) 0x81,
                 0x00 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -505,7 +506,7 @@ public class ExtendedRequestTest
             // Check the length
             assertEquals( 0x18, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }



Mime
View raw message