directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1049873 [7/8] - in /directory: apacheds/branches/alex_refactoring/core-api/src/main/java/org/apache/directory/server/core/ apacheds/branches/alex_refactoring/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/ apac...
Date Thu, 16 Dec 2010 10:19:41 GMT
Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java Thu Dec 16 10:19:33 2010
@@ -46,7 +46,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.schema.normalizers.DeepTrimToLowerNormalizer;
 import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -148,7 +148,7 @@ public class SearchRequestSubstringTest
             // LDAPString
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -200,7 +200,7 @@ public class SearchRequestSubstringTest
             // Check the length
             assertEquals( 0x64, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x53 ), decodedPdu.substring( 0, 0x53 ) );
         }
@@ -294,7 +294,7 @@ public class SearchRequestSubstringTest
                 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 BindRequest Container
@@ -343,7 +343,7 @@ public class SearchRequestSubstringTest
 
         Control control = searchRequest.getControl( "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
         // We won't check the whole PDU, as it may differs because
@@ -355,7 +355,7 @@ public class SearchRequestSubstringTest
             // Check the length
             assertEquals( 0x0081, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x53 ), decodedPdu.substring( 0, 0x53 ) );
         }
@@ -422,7 +422,7 @@ public class SearchRequestSubstringTest
             // LDAPString
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -476,7 +476,7 @@ public class SearchRequestSubstringTest
             // Check the length
             assertEquals( 0x64, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x53 ), decodedPdu.substring( 0, 0x53 ) );
         }
@@ -544,7 +544,7 @@ public class SearchRequestSubstringTest
             // LDAPString
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -598,7 +598,7 @@ public class SearchRequestSubstringTest
             // Check the length
             assertEquals( 0x67, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x58 ), decodedPdu.substring( 0, 0x58 ) );
         }
@@ -667,7 +667,7 @@ public class SearchRequestSubstringTest
             // LDAPString
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -721,7 +721,7 @@ public class SearchRequestSubstringTest
             // Check the length
             assertEquals( 0x6A, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x5B ), decodedPdu.substring( 0, 0x5B ) );
         }
@@ -789,7 +789,7 @@ public class SearchRequestSubstringTest
             // LDAPString
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -842,7 +842,7 @@ public class SearchRequestSubstringTest
             // Check the length
             assertEquals( 0x67, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x58 ), decodedPdu.substring( 0, 0x58 ) );
         }
@@ -914,7 +914,7 @@ public class SearchRequestSubstringTest
                 0x04, 0x05, 'a', 't', 't', 'r', '2' // AttributeDescription ::= LDAPString
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -969,7 +969,7 @@ public class SearchRequestSubstringTest
             // Check the length
             assertEquals( 0x6A, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x5B ), decodedPdu.substring( 0, 0x5B ) );
         }
@@ -1037,7 +1037,7 @@ public class SearchRequestSubstringTest
             // LDAPString
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -1090,7 +1090,7 @@ public class SearchRequestSubstringTest
             // Check the length
             assertEquals( 0x67, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x58 ), decodedPdu.substring( 0, 0x58 ) );
         }
@@ -1159,7 +1159,7 @@ public class SearchRequestSubstringTest
             // LDAPString
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -1215,7 +1215,7 @@ public class SearchRequestSubstringTest
             // Check the length
             assertEquals( 0x6A, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x5B ), decodedPdu.substring( 0, 0x5B ) );
         }
@@ -1302,7 +1302,7 @@ public class SearchRequestSubstringTest
             // LDAPString
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -1356,7 +1356,7 @@ public class SearchRequestSubstringTest
             // Check the length
             assertEquals( 0x67, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x5B ), decodedPdu.substring( 0, 0x5B ) );
         }

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java Thu Dec 16 10:19:33 2010
@@ -55,7 +55,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.schema.normalizers.DeepTrimToLowerNormalizer;
 import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -169,7 +169,7 @@ public class SearchRequestTest
                 0x04, 0x05, 'a', 't', 't', 'r', '2' // AttributeDescription ::= LDAPString
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -262,7 +262,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x90, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x81 ), decodedPdu.substring( 0, 0x81 ) );
         }
@@ -336,7 +336,7 @@ public class SearchRequestTest
                 0x04, 0x05, 'a', 't', 't', 'r', '2' // AttributeDescription ::= LDAPString
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -430,7 +430,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x0090, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x81 ), decodedPdu.substring( 0, 0x81 ) );
         }
@@ -511,7 +511,7 @@ public class SearchRequestTest
             // LDAPString
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -598,7 +598,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x7B, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x6C ), decodedPdu.substring( 0, 0x6C ) );
         }
@@ -656,7 +656,7 @@ public class SearchRequestTest
                 0x00, 0x00, // Some trailing 00, useless.
                 0x00, 0x00, 0x00, 0x00 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -703,7 +703,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x39, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu.substring( 0, decodedPdu.length() - 35 ) );
         }
@@ -934,7 +934,7 @@ public class SearchRequestTest
                 0x04, 0x05, 'a', 't', 't', 'r', '2' // attr2
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -1016,7 +1016,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x0096, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x87 ), decodedPdu.substring( 0, 0x87 ) );
         }
@@ -1084,7 +1084,7 @@ public class SearchRequestTest
 
         ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
         stream.put( asn1BER );
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         Asn1Container ldapMessageContainer = new LdapMessageContainer();
@@ -1135,7 +1135,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x81, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
             assertEquals( decodedPdu, encodedPdu );
         }
         catch ( EncoderException ee )
@@ -1384,7 +1384,7 @@ public class SearchRequestTest
 
         ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
         stream.put( asn1BER );
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         Asn1Container ldapMessageContainer = new LdapMessageContainer();
@@ -1432,7 +1432,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x5F, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
             assertEquals( decodedPdu, encodedPdu );
         }
         catch ( EncoderException ee )
@@ -1570,7 +1570,7 @@ public class SearchRequestTest
                 0x04, 0x05, 'a', 't', 't', 'r', '2' // AttributeDescription ::= LDAPString
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -1663,7 +1663,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x6F, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x6F ), decodedPdu.substring( 0, 0x6F ) );
         }
@@ -2600,7 +2600,7 @@ public class SearchRequestTest
 
         ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
         stream.put( asn1BER );
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -2653,7 +2653,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x43, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -2692,7 +2692,7 @@ public class SearchRequestTest
 
         ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
         stream.put( asn1BER );
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -2746,7 +2746,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x46, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -3033,7 +3033,7 @@ public class SearchRequestTest
 
         ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
         stream.put( asn1BER );
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -3097,7 +3097,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x62, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -3148,7 +3148,7 @@ public class SearchRequestTest
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -3200,7 +3200,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x25, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x25 ), decodedPdu.substring( 0, 0x25 ) );
         }
@@ -3252,7 +3252,7 @@ public class SearchRequestTest
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -3311,7 +3311,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x27, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x27 ), decodedPdu.substring( 0, 0x27 ) );
         }
@@ -3368,7 +3368,7 @@ public class SearchRequestTest
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -3437,7 +3437,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x2F, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x2F ), decodedPdu.substring( 0, 0x2F ) );
         }
@@ -3488,7 +3488,7 @@ public class SearchRequestTest
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -3554,7 +3554,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x29, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x29 ), decodedPdu.substring( 0, 0x29 ) );
         }
@@ -3611,7 +3611,7 @@ public class SearchRequestTest
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -3687,7 +3687,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x31, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x31 ), decodedPdu.substring( 0, 0x31 ) );
         }
@@ -3743,7 +3743,7 @@ public class SearchRequestTest
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -3819,7 +3819,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x31, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x31 ), decodedPdu.substring( 0, 0x31 ) );
         }
@@ -3879,7 +3879,7 @@ public class SearchRequestTest
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -3965,7 +3965,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x39, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x39 ), decodedPdu.substring( 0, 0x39 ) );
         }
@@ -4025,7 +4025,7 @@ public class SearchRequestTest
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -4111,7 +4111,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x39, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x39 ), decodedPdu.substring( 0, 0x39 ) );
         }
@@ -4168,7 +4168,7 @@ public class SearchRequestTest
                 0x30, 0x00 // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -4251,7 +4251,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x33, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x33 ), decodedPdu.substring( 0, 0x33 ) );
         }
@@ -4312,7 +4312,7 @@ public class SearchRequestTest
                 0x30, 0x00 // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -4405,7 +4405,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x3B, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x3B ), decodedPdu.substring( 0, 0x3B ) );
         }
@@ -4461,7 +4461,7 @@ public class SearchRequestTest
                 0x30, 0x00 // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -4543,7 +4543,7 @@ public class SearchRequestTest
             // Check the length
             assertEquals( 0x3B, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.substring( 0, 0x3B ), decodedPdu.substring( 0, 0x3B ) );
         }

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java Thu Dec 16 10:19:33 2010
@@ -38,7 +38,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.SearchResultDone;
 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 SearchResultDoneTest
             // }
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -112,7 +112,7 @@ public class SearchResultDoneTest
             // Check the length
             assertEquals( 0x0E, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -161,7 +161,7 @@ public class SearchResultDoneTest
 
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -191,7 +191,7 @@ public class SearchResultDoneTest
 
         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
@@ -201,7 +201,7 @@ public class SearchResultDoneTest
             // 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/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java Thu Dec 16 10:19:33 2010
@@ -41,7 +41,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.LdapEncoder;
 import org.apache.directory.shared.ldap.message.SearchResultEntry;
 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;
 
@@ -96,7 +96,7 @@ public class SearchResultEntryTest
                 // AttributeValue ::= OCTET STRING
                 0x04, 0x12, 'o', 'r', 'g', 'a', 'n', 'i', 'z', 'a', 't', 'i', 'o', 'n', 'a', 'l', 'U', 'n', 'i', 't' } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -140,7 +140,7 @@ public class SearchResultEntryTest
             // Check the length
             assertEquals( 0x50, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -308,7 +308,7 @@ public class SearchResultEntryTest
                 0x02, 0x01, 0x02 // messageID MessageID ...
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -361,7 +361,7 @@ public class SearchResultEntryTest
             // Check the length
             assertEquals( 0x61, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             // We have to supress the last 5 chars from the decodedPDU, as they
             // belongs to the next message.
@@ -527,7 +527,7 @@ public class SearchResultEntryTest
                 // PartialAttributeList ::= SEQUENCE OF SEQUENCE {
                 0x30, 0x00 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -561,7 +561,7 @@ public class SearchResultEntryTest
             // Check the length
             assertEquals( 0x26, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -802,7 +802,7 @@ public class SearchResultEntryTest
                 // type AttributeDescription,
                 0x04, 0x0b, 'o', 'b', 'j', 'e', 'c', 't', 'c', 'l', 'a', 's', 's', 0x31, 0x00 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -844,7 +844,7 @@ public class SearchResultEntryTest
             // Check the length
             assertEquals( 0x37, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -889,7 +889,7 @@ public class SearchResultEntryTest
                 // type AttributeDescription,
                 0x04, 0x0b, 'o', 'b', 'j', 'e', 'c', 't', 'c', 'l', 'a', 'z', 'z', 0x31, 0x00 } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -931,7 +931,7 @@ public class SearchResultEntryTest
             // Check the length
             assertEquals( 0x48, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu.length(), decodedPdu.length() );
         }
@@ -979,7 +979,7 @@ public class SearchResultEntryTest
                 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 BindRequest Container
@@ -1021,7 +1021,7 @@ public class SearchResultEntryTest
 
         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
@@ -1031,7 +1031,7 @@ public class SearchResultEntryTest
             // Check the length
             assertEquals( 0x54, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -1076,7 +1076,7 @@ public class SearchResultEntryTest
                 // AttributeValue ::= OCTET STRING
                 0x04, 0x00, } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -1119,7 +1119,7 @@ public class SearchResultEntryTest
             // Check the length
             assertEquals( 0x39, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -1170,7 +1170,7 @@ public class SearchResultEntryTest
                 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 BindRequest Container
@@ -1212,7 +1212,7 @@ public class SearchResultEntryTest
 
         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
@@ -1222,7 +1222,7 @@ public class SearchResultEntryTest
             // Check the length
             assertEquals( 0x56, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java Thu Dec 16 10:19:33 2010
@@ -42,6 +42,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.SearchResultReference;
 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;
 
@@ -110,7 +111,7 @@ public class SearchResultReferenceTest
             }
         }
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -164,7 +165,7 @@ public class SearchResultReferenceTest
             // Check the length
             assertEquals( 0x3D8, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -238,7 +239,7 @@ public class SearchResultReferenceTest
             stream.put( controlBytes[i] );
         }
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -294,7 +295,7 @@ public class SearchResultReferenceTest
 
         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
@@ -304,7 +305,7 @@ public class SearchResultReferenceTest
             // Check the length
             assertEquals( 0x3F5, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -382,7 +383,7 @@ public class SearchResultReferenceTest
             // LDAPURL
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -420,7 +421,7 @@ public class SearchResultReferenceTest
             // Check the length
             assertEquals( 0x11, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java Thu Dec 16 10:19:33 2010
@@ -35,7 +35,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChangeControlContainer;
 import org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChangeControlDecoder;
 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.Test;
 import org.junit.runner.RunWith;
 
@@ -344,7 +344,7 @@ public class EntryChangeControlTest
                   0x02, 0x01, 0x10,                //     changeNumber INTEGER OPTIONAL -- if supported
             } );
 
-        String expected = StringTools.dumpBytes( bb.array() );
+        String expected = Strings.dumpBytes(bb.array());
         bb.flip();
 
         EntryChangeControl entry = new EntryChangeControl();
@@ -352,7 +352,7 @@ public class EntryChangeControlTest
         entry.setChangeNumber( 16 );
         entry.setPreviousDn( new DN( "a=b" ) );
         bb = entry.encode( ByteBuffer.allocate( entry.computeLength() ) );
-        String decoded = StringTools.dumpBytes( bb.array() );
+        String decoded = Strings.dumpBytes(bb.array());
         assertEquals( expected, decoded );
     }
 
@@ -381,7 +381,7 @@ public class EntryChangeControlTest
                     0x12, 0x34, 0x56, 0x78, (byte)0x9a, (byte)0xbc, (byte)0xde
             } );
 
-        String expected = StringTools.dumpBytes( bb.array() );
+        String expected = Strings.dumpBytes(bb.array());
         bb.flip();
 
         EntryChangeControl entry = new EntryChangeControl();
@@ -389,7 +389,7 @@ public class EntryChangeControlTest
         entry.setChangeNumber( 5124095576030430L );
         entry.setPreviousDn( new DN( "a=b" ) );
         bb = entry.encode( ByteBuffer.allocate( entry.computeLength() ) );
-        String decoded = StringTools.dumpBytes( bb.array() );
+        String decoded = Strings.dumpBytes(bb.array());
         assertEquals( expected, decoded );
     }
 }

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java Thu Dec 16 10:19:33 2010
@@ -33,7 +33,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.ldap.codec.search.controls.persistentSearch.PersistentSearchControl;
 import org.apache.directory.shared.ldap.codec.search.controls.persistentSearch.PersistentSearchControlContainer;
 import org.apache.directory.shared.ldap.codec.search.controls.persistentSearch.PersistentSearchControlDecoder;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -68,7 +68,7 @@ public class PSearchControlTest
                   0x01, 0x01, 0x00    // returnECs BOOLEAN
             } );
 
-        String expected = StringTools.dumpBytes( bb.array() );
+        String expected = Strings.dumpBytes(bb.array());
         bb.flip();
 
         PersistentSearchControl ctrl = new PersistentSearchControl();
@@ -76,7 +76,7 @@ public class PSearchControlTest
         ctrl.setReturnECs( false );
         ctrl.setChangeTypes( 1 );
         bb = ctrl.encode(ByteBuffer.allocate( ctrl.computeLength() ) );
-        String decoded = StringTools.dumpBytes( bb.array() );
+        String decoded = Strings.dumpBytes(bb.array());
         assertEquals( expected, decoded );
     }
 

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java Thu Dec 16 10:19:33 2010
@@ -36,6 +36,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.search.controls.pagedSearch.PagedResultsControlContainer;
 import org.apache.directory.shared.ldap.codec.search.controls.pagedSearch.PagedResultsControlDecoder;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.CharConstants;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -105,8 +107,8 @@ public class PagedSearchControlTest
         ctrl.setCookie( StringTools.getBytesUtf8( "test" ) );
 
         bb = ctrl.encode( ByteBuffer.allocate( ctrl.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 );
     }
     
@@ -257,8 +259,8 @@ public class PagedSearchControlTest
         ctrl.setCookie( StringTools.getBytesUtf8( "test" ) );
 
         bb = ctrl.encode( ByteBuffer.allocate( ctrl.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 );
     }
     
@@ -326,7 +328,7 @@ public class PagedSearchControlTest
         PagedResultsControl pagedSearch = container.getPagedSearchControl();
         assertEquals( 32, pagedSearch.getSize() );
         assertNotNull( pagedSearch.getCookie() );
-        assertEquals( StringTools.EMPTY_BYTES, pagedSearch.getCookie() );
+        assertEquals( CharConstants.EMPTY_BYTES, pagedSearch.getCookie() );
             
         ByteBuffer buffer = ByteBuffer.allocate( 0x23 );
         buffer.put( new byte[]
@@ -348,8 +350,8 @@ public class PagedSearchControlTest
         ctrl.setCookie( null );
 
         bb = ctrl.encode( ByteBuffer.allocate( ctrl.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 );
 
     }

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlTest.java Thu Dec 16 10:19:33 2010
@@ -35,7 +35,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.ldap.codec.search.controls.subentries.SubentriesControl;
 import org.apache.directory.shared.ldap.codec.search.controls.subentries.SubentriesControlContainer;
 import org.apache.directory.shared.ldap.codec.search.controls.subentries.SubentriesControlDecoder;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -96,8 +96,8 @@ public class SubEntryControlTest
             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 )
@@ -155,8 +155,8 @@ public class SubEntryControlTest
             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 )

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java Thu Dec 16 10:19:33 2010
@@ -38,7 +38,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.UnbindRequest;
 import org.apache.directory.shared.ldap.message.UnbindRequestImpl;
 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;
 
@@ -70,7 +70,7 @@ public class UnBindRequestTest
             // UnbindRequest ::= [APPLICATION 2] NULL
             } );
 
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
+        String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
         // Allocate a BindRequest Container
@@ -100,7 +100,7 @@ public class UnBindRequestTest
             // Check the length
             assertEquals( 0x07, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -134,7 +134,7 @@ public class UnBindRequestTest
                 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 BindRequest Container
@@ -161,7 +161,7 @@ public class UnBindRequestTest
 
         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
         UnbindRequest internalUnbindRequest = new UnbindRequestImpl( unbindRequest.getMessageId() );
@@ -174,7 +174,7 @@ public class UnBindRequestTest
             // Check the length
             assertEquals( 0x24, bb.limit() );
 
-            String encodedPdu = StringTools.dumpBytes( bb.array() );
+            String encodedPdu = Strings.dumpBytes(bb.array());
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/entry/BinaryValueAttributeTypeTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/entry/BinaryValueAttributeTypeTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/entry/BinaryValueAttributeTypeTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/entry/BinaryValueAttributeTypeTest.java Thu Dec 16 10:19:33 2010
@@ -44,6 +44,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.comparators.ByteArrayComparator;
 import org.apache.directory.shared.ldap.schema.syntaxCheckers.OctetStringSyntaxChecker;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.CharConstants;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -249,9 +250,9 @@ public class BinaryValueAttributeTypeTes
     {
         AttributeType attribute = EntryUtils.getBytesAttributeType();
         
-        BinaryValue value = new BinaryValue( attribute, StringTools.EMPTY_BYTES );
+        BinaryValue value = new BinaryValue( attribute, CharConstants.EMPTY_BYTES );
         
-        assertEquals( StringTools.EMPTY_BYTES, value.getReference() );
+        assertEquals( CharConstants.EMPTY_BYTES, value.getReference() );
         assertFalse( value.isNull() );
     }
     
@@ -299,10 +300,10 @@ public class BinaryValueAttributeTypeTes
         
         assertEquals( bv, bv1 );
         
-        bv = new BinaryValue( StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( CharConstants.EMPTY_BYTES );
         
         assertNotSame( bv, bv1 );
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, bv.getBytes() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, bv.getBytes() ) );
         
         bv = new BinaryValue( BYTES2 );
         bv1 = bv.clone();
@@ -356,8 +357,8 @@ public class BinaryValueAttributeTypeTes
         BinaryValue value = new BinaryValue( attribute, null );
         assertNull( value.getNormalizedValue() );
 
-        value = new BinaryValue( attribute, StringTools.EMPTY_BYTES );
-        assertTrue( Arrays.equals(  StringTools.EMPTY_BYTES, value.getNormalizedValue() ) );
+        value = new BinaryValue( attribute, CharConstants.EMPTY_BYTES );
+        assertTrue( Arrays.equals(  CharConstants.EMPTY_BYTES, value.getNormalizedValue() ) );
 
         value = new BinaryValue( attribute, BYTES2 );
         assertTrue( Arrays.equals( BYTES1, value.getNormalizedValue() ) );
@@ -374,8 +375,8 @@ public class BinaryValueAttributeTypeTes
         BinaryValue value = new BinaryValue( attribute, null );
         assertNull( value.getNormalizedValue() );
 
-        value = new BinaryValue( attribute, StringTools.EMPTY_BYTES );
-        assertTrue( Arrays.equals(  StringTools.EMPTY_BYTES, value.getNormalizedValue() ) );
+        value = new BinaryValue( attribute, CharConstants.EMPTY_BYTES );
+        assertTrue( Arrays.equals(  CharConstants.EMPTY_BYTES, value.getNormalizedValue() ) );
 
         value = new BinaryValue( attribute, BYTES2 );
         assertTrue( Arrays.equals( BYTES1, value.getNormalizedValue() ) );
@@ -392,8 +393,8 @@ public class BinaryValueAttributeTypeTes
         BinaryValue value = new BinaryValue( attribute, null );
         assertNull( value.getNormalizedValueReference() );
 
-        value = new BinaryValue( attribute, StringTools.EMPTY_BYTES );
-        assertTrue( Arrays.equals(  StringTools.EMPTY_BYTES, value.getNormalizedValueReference() ) );
+        value = new BinaryValue( attribute, CharConstants.EMPTY_BYTES );
+        assertTrue( Arrays.equals(  CharConstants.EMPTY_BYTES, value.getNormalizedValueReference() ) );
 
         value = new BinaryValue( attribute, BYTES2 );
         assertTrue( Arrays.equals( BYTES1, value.getNormalizedValueReference() ) );
@@ -425,7 +426,7 @@ public class BinaryValueAttributeTypeTes
         BinaryValue value = new BinaryValue( attribute, null );
         assertTrue( value.isValid() );
         
-        value = new BinaryValue( attribute, StringTools.EMPTY_BYTES );
+        value = new BinaryValue( attribute, CharConstants.EMPTY_BYTES );
         assertTrue( value.isValid() );
 
         value = new BinaryValue( attribute, new byte[]{0x01, 0x02} );
@@ -483,7 +484,7 @@ public class BinaryValueAttributeTypeTes
         bv.normalize();
         assertTrue( bv.isSame() );
         
-        bv = new BinaryValue( attribute, StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( attribute, CharConstants.EMPTY_BYTES );
         bv.normalize();
         assertTrue( bv.isSame() );
 
@@ -526,9 +527,9 @@ public class BinaryValueAttributeTypeTes
         bv.normalize();
         assertEquals( null, bv.getNormalizedValue() );
         
-        bv = new BinaryValue( attribute, StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( attribute, CharConstants.EMPTY_BYTES );
         bv.normalize();
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, bv.getNormalizedValue() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, bv.getNormalizedValue() ) );
 
         bv = new BinaryValue( attribute, BYTES2 );
         bv.normalize();
@@ -645,13 +646,13 @@ public class BinaryValueAttributeTypeTes
     @Test public void testEmptyBinaryValueSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         // First check with a value which will be normalized
-        BinaryValue sbv = new BinaryValue( at, StringTools.EMPTY_BYTES );
+        BinaryValue sbv = new BinaryValue( at, CharConstants.EMPTY_BYTES );
         
         sbv.normalize();
         byte[] normalized = sbv.getNormalizedValueReference();
         
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, normalized ) );
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, sbv.getBytes() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, normalized ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, sbv.getBytes() ) );
         
         BinaryValue sbvSer = deserializeValue( serializeValue( sbv ), at );
         

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/entry/BinaryValueTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/entry/BinaryValueTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/entry/BinaryValueTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/entry/BinaryValueTest.java Thu Dec 16 10:19:33 2010
@@ -34,12 +34,11 @@ import java.util.Arrays;
 
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
-import org.apache.directory.shared.ldap.entry.BinaryValue;
-import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.SyntaxChecker;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.CharConstants;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -100,7 +99,7 @@ public class BinaryValueTest
         {
             if ( value.isBinary() )
             {
-                return new BinaryValue( StringTools.EMPTY_BYTES );
+                return new BinaryValue( CharConstants.EMPTY_BYTES );
             }
 
             throw new IllegalStateException( "expected byte[] to normalize" );
@@ -207,8 +206,8 @@ public class BinaryValueTest
         BinaryValue bv = new BinaryValue();
         assertEquals( 0, bv.hashCode() );
         
-        bv = new BinaryValue( StringTools.EMPTY_BYTES );
-        int h = Arrays.hashCode( StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( CharConstants.EMPTY_BYTES );
+        int h = Arrays.hashCode( CharConstants.EMPTY_BYTES );
         assertEquals( h, bv.hashCode() );
         
         h = Arrays.hashCode( BYTES1 );
@@ -233,17 +232,17 @@ public class BinaryValueTest
     @Test
     public void testBinaryValueEmpty() throws LdapException
     {
-        BinaryValue cbv = new BinaryValue( StringTools.EMPTY_BYTES );
+        BinaryValue cbv = new BinaryValue( CharConstants.EMPTY_BYTES );
         
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, cbv.getBytes() ) );
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, cbv.get() ) );
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, cbv.getReference() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, cbv.getBytes() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, cbv.get() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, cbv.getReference() ) );
         assertFalse( cbv.isNormalized() );
         assertTrue( cbv.isValid( BINARY_CHECKER ) );
         assertFalse( cbv.isNull() );
         assertNotNull( cbv.getNormalizedValue() );
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, cbv.getNormalizedValue() ) );
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, cbv.getNormalizedValueReference() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, cbv.getNormalizedValue() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, cbv.getNormalizedValueReference() ) );
     }
 
 
@@ -312,11 +311,11 @@ public class BinaryValueTest
         assertTrue( bv.isNormalized() );
         assertEquals( null, bv.getNormalizedValue() );
         
-        bv = new BinaryValue( StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( CharConstants.EMPTY_BYTES );
         bv.normalize( BINARY_NORMALIZER );
         assertTrue( bv.isNormalized() );
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, bv.getBytes() ) );
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, bv.getNormalizedValue() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, bv.getBytes() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, bv.getNormalizedValue() ) );
         
         bv = new BinaryValue( BYTES1 );
         bv.normalize( BINARY_NORMALIZER );
@@ -404,9 +403,9 @@ public class BinaryValueTest
         
         assertNull( bv.get() );
         
-        bv = new BinaryValue( StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( CharConstants.EMPTY_BYTES );
         assertNotNull( bv.get() );
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, bv.get() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, bv.get() ) );
         
         bv = new BinaryValue( BYTES1 );
         byte[] copy = bv.get();
@@ -457,7 +456,7 @@ public class BinaryValueTest
         
         assertEquals( "null", bv.toString() );
 
-        bv = new BinaryValue( StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( CharConstants.EMPTY_BYTES );
         assertEquals( "''", bv.toString() );
 
         bv = new BinaryValue( BYTES1 );
@@ -472,9 +471,9 @@ public class BinaryValueTest
         
         assertNull( bv.getReference() );
         
-        bv = new BinaryValue( StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( CharConstants.EMPTY_BYTES );
         assertNotNull( bv.getReference() );
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, bv.getReference() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, bv.getReference() ) );
         
         bv = new BinaryValue( BYTES1 );
         byte[] reference = bv.getReference();
@@ -494,9 +493,9 @@ public class BinaryValueTest
         
         assertNull( bv.get() );
         
-        bv = new BinaryValue( StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( CharConstants.EMPTY_BYTES );
         assertNotNull( bv.get() );
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, bv.getBytes() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, bv.getBytes() ) );
         
         bv = new BinaryValue( BYTES1 );
         byte[] get = bv.getBytes();
@@ -558,7 +557,7 @@ public class BinaryValueTest
         
         assertTrue( bv.isNull() );
         
-        bv = new BinaryValue( StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( CharConstants.EMPTY_BYTES );
         assertFalse( bv.isNull() );
         
         bv = new BinaryValue( BYTES1 );
@@ -575,7 +574,7 @@ public class BinaryValueTest
         bv.isValid( BINARY_CHECKER );
         assertTrue( bv.isValid() );
         
-        bv = new BinaryValue( StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( CharConstants.EMPTY_BYTES );
         assertFalse( bv.isValid() );
         bv.isValid( BINARY_CHECKER );
         assertTrue( bv.isValid() );
@@ -599,7 +598,7 @@ public class BinaryValueTest
         
         assertTrue( bv.isValid( BINARY_CHECKER ) ) ;
         
-        bv = new BinaryValue( StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( CharConstants.EMPTY_BYTES );
         assertTrue( bv.isValid( BINARY_CHECKER ) );
         
         bv = new BinaryValue( BYTES1 );
@@ -619,10 +618,10 @@ public class BinaryValueTest
         assertTrue( bv.isNormalized() );
         assertEquals( null, bv.getNormalizedValue() );
         
-        bv = new BinaryValue( StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( CharConstants.EMPTY_BYTES );
         bv.normalize();
         assertTrue( bv.isNormalized() );
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, bv.getNormalizedValue() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, bv.getNormalizedValue() ) );
         
         bv = new BinaryValue( BYTES2 );
         bv.normalize();
@@ -641,9 +640,9 @@ public class BinaryValueTest
         assertTrue( bv.isValid( BINARY_CHECKER ) );
         assertTrue( bv.isNull() );
 
-        bv = new BinaryValue( StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( CharConstants.EMPTY_BYTES );
         assertNotNull( bv.get() );
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, bv.getBytes() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, bv.getBytes() ) );
         assertFalse( bv.isNormalized() );
         assertTrue( bv.isValid( BINARY_CHECKER ) );
         assertFalse( bv.isNull() );
@@ -796,7 +795,7 @@ public class BinaryValueTest
     {
         BinaryValue bv = new BinaryValue();
         bv.setNormalized( true );
-        bv = new BinaryValue( StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( CharConstants.EMPTY_BYTES );
         bv.isValid( BINARY_CHECKER );
         bv.normalize( BINARY_NORMALIZER );
 
@@ -817,7 +816,7 @@ public class BinaryValueTest
     {
         BinaryValue bv = new BinaryValue();
         bv.setNormalized( false );
-        bv = new BinaryValue( StringTools.EMPTY_BYTES );
+        bv = new BinaryValue( CharConstants.EMPTY_BYTES );
         bv.isValid( BINARY_CHECKER );
 
         BinaryValue cbvSer = deserializeValue( serializeValue( bv ) );

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/entry/DefaultEntryAttributeTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/entry/DefaultEntryAttributeTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/entry/DefaultEntryAttributeTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/entry/DefaultEntryAttributeTest.java Thu Dec 16 10:19:33 2010
@@ -37,15 +37,11 @@ import javax.naming.directory.InvalidAtt
 
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
-import org.apache.directory.shared.ldap.entry.BinaryValue;
-import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
-import org.apache.directory.shared.ldap.entry.StringValue;
-import org.apache.directory.shared.ldap.entry.EntryAttribute;
-import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.schema.syntaxCheckers.Ia5StringSyntaxChecker;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.CharConstants;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -651,10 +647,10 @@ public class DefaultEntryAttributeTest
         
         EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
         
-        nbAdded = attr2.add( StringTools.EMPTY_BYTES );
+        nbAdded = attr2.add( CharConstants.EMPTY_BYTES );
         assertEquals( 1, nbAdded );
         assertFalse( attr2.isHR() );
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, attr2.getBytes() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, attr2.getBytes() ) );
         
         EntryAttribute attr3 = new DefaultEntryAttribute( "test" );
         
@@ -1201,10 +1197,10 @@ public class DefaultEntryAttributeTest
         
         EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
         
-        nbAdded = attr2.add( StringTools.EMPTY_BYTES );
+        nbAdded = attr2.add( CharConstants.EMPTY_BYTES );
         assertEquals( 1, nbAdded );
         assertFalse( attr2.isHR() );
-        assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, attr2.getBytes() ) );
+        assertTrue( Arrays.equals( CharConstants.EMPTY_BYTES, attr2.getBytes() ) );
         
         EntryAttribute attr3 = new DefaultEntryAttribute( "test" );
         

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReaderTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReaderTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReaderTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReaderTest.java Thu Dec 16 10:19:33 2010
@@ -43,7 +43,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -551,7 +551,7 @@ public class LdifAttributesReaderTest
             if ( "jpegphoto".equalsIgnoreCase( values[i][0] ) )
             {
                 Attribute attr = attributes.get( values[i][0] );
-                assertEquals( StringTools.dumpBytes( data ), StringTools.dumpBytes( ( byte[] ) attr.get() ) );
+                assertEquals( Strings.dumpBytes(data), Strings.dumpBytes((byte[]) attr.get()) );
             }
             else
             {

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java Thu Dec 16 10:19:33 2010
@@ -43,6 +43,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 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.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -1157,7 +1158,7 @@ public class LdifReaderTest
             else if ( "jpegphoto".equalsIgnoreCase( values[i][0] ) )
             {
                 EntryAttribute attr = entry.get( values[i][0] );
-                assertEquals( StringTools.dumpBytes( data ), StringTools.dumpBytes( attr.getBytes() ) );
+                assertEquals( Strings.dumpBytes(data), Strings.dumpBytes(attr.getBytes()) );
             }
             else
             {
@@ -1349,7 +1350,7 @@ public class LdifReaderTest
             else if ( "jpegphoto".equalsIgnoreCase( values[0][i][0] ) )
             {
                 EntryAttribute attr = entry.get( values[0][i][0] );
-                assertEquals( StringTools.dumpBytes( data ), StringTools.dumpBytes( attr.getBytes() ) );
+                assertEquals( Strings.dumpBytes(data), Strings.dumpBytes(attr.getBytes()) );
             }
             else
             {

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java Thu Dec 16 10:19:33 2010
@@ -37,6 +37,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -697,10 +698,10 @@ public class RdnTest
     {
         byte[] res = ( byte[] ) RDN.unescapeValue( "#fF" );
 
-        assertEquals( "0xFF ", StringTools.dumpBytes( res ) );
+        assertEquals( "0xFF ", Strings.dumpBytes(res) );
 
         res = ( byte[] ) RDN.unescapeValue( "#0123456789aBCDEF" );
-        assertEquals( "0x01 0x23 0x45 0x67 0x89 0xAB 0xCD 0xEF ", StringTools.dumpBytes( res ) );
+        assertEquals( "0x01 0x23 0x45 0x67 0x89 0xAB 0xCD 0xEF ", Strings.dumpBytes(res) );
     }
 
 

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/OctetStringSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/OctetStringSyntaxCheckerTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/OctetStringSyntaxCheckerTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/OctetStringSyntaxCheckerTest.java Thu Dec 16 10:19:33 2010
@@ -25,7 +25,7 @@ import static org.junit.Assert.assertTru
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.ldap.schema.syntaxCheckers.OctetStringSyntaxChecker;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.CharConstants;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -51,7 +51,7 @@ public class OctetStringSyntaxCheckerTes
     @Test
     public void testEmptyOctetString()
     {
-        assertTrue( checker.isValidSyntax( StringTools.EMPTY_BYTES ) );
+        assertTrue( checker.isValidSyntax( CharConstants.EMPTY_BYTES ) );
     }
 
 

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/UuidSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/UuidSyntaxCheckerTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/UuidSyntaxCheckerTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/UuidSyntaxCheckerTest.java Thu Dec 16 10:19:33 2010
@@ -26,6 +26,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.ldap.schema.syntaxCheckers.UuidSyntaxChecker;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.CharConstants;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -51,7 +52,7 @@ public class UuidSyntaxCheckerTest
     @Test
     public void testEmptyUuid()
     {
-        assertFalse( checker.isValidSyntax( StringTools.EMPTY_BYTES ) );
+        assertFalse( checker.isValidSyntax( CharConstants.EMPTY_BYTES ) );
     }
 
 

Modified: directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/util/StringToolsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/util/StringToolsTest.java?rev=1049873&r1=1049872&r2=1049873&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/util/StringToolsTest.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/util/StringToolsTest.java Thu Dec 16 10:19:33 2010
@@ -36,6 +36,7 @@ import javax.naming.NamingException;
 
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -148,29 +149,29 @@ public class StringToolsTest
     @Test
     public void testcharToBytesOne()
     {
-        assertEquals( "0x00 ", StringTools.dumpBytes( StringTools.charToBytes( ( char ) 0x0000 ) ) );
-        assertEquals( "0x61 ", StringTools.dumpBytes( StringTools.charToBytes( 'a' ) ) );
-        assertEquals( "0x7F ", StringTools.dumpBytes( StringTools.charToBytes( ( char ) 0x007F ) ) );
+        assertEquals( "0x00 ", Strings.dumpBytes(StringTools.charToBytes((char) 0x0000)) );
+        assertEquals( "0x61 ", Strings.dumpBytes(StringTools.charToBytes('a')) );
+        assertEquals( "0x7F ", Strings.dumpBytes(StringTools.charToBytes((char) 0x007F)) );
     }
 
 
     @Test
     public void testcharToBytesTwo()
     {
-        assertEquals( "0xC2 0x80 ", StringTools.dumpBytes( StringTools.charToBytes( ( char ) 0x0080 ) ) );
-        assertEquals( "0xC3 0xBF ", StringTools.dumpBytes( StringTools.charToBytes( ( char ) 0x00FF ) ) );
-        assertEquals( "0xC4 0x80 ", StringTools.dumpBytes( StringTools.charToBytes( ( char ) 0x0100 ) ) );
-        assertEquals( "0xDF 0xBF ", StringTools.dumpBytes( StringTools.charToBytes( ( char ) 0x07FF ) ) );
+        assertEquals( "0xC2 0x80 ", Strings.dumpBytes(StringTools.charToBytes((char) 0x0080)) );
+        assertEquals( "0xC3 0xBF ", Strings.dumpBytes(StringTools.charToBytes((char) 0x00FF)) );
+        assertEquals( "0xC4 0x80 ", Strings.dumpBytes(StringTools.charToBytes((char) 0x0100)) );
+        assertEquals( "0xDF 0xBF ", Strings.dumpBytes(StringTools.charToBytes((char) 0x07FF)) );
     }
 
 
     @Test
     public void testcharToBytesThree()
     {
-        assertEquals( "0xE0 0xA0 0x80 ", StringTools.dumpBytes( StringTools.charToBytes( ( char ) 0x0800 ) ) );
-        assertEquals( "0xE0 0xBF 0xBF ", StringTools.dumpBytes( StringTools.charToBytes( ( char ) 0x0FFF ) ) );
-        assertEquals( "0xE1 0x80 0x80 ", StringTools.dumpBytes( StringTools.charToBytes( ( char ) 0x1000 ) ) );
-        assertEquals( "0xEF 0xBF 0xBF ", StringTools.dumpBytes( StringTools.charToBytes( ( char ) 0xFFFF ) ) );
+        assertEquals( "0xE0 0xA0 0x80 ", Strings.dumpBytes(StringTools.charToBytes((char) 0x0800)) );
+        assertEquals( "0xE0 0xBF 0xBF ", Strings.dumpBytes(StringTools.charToBytes((char) 0x0FFF)) );
+        assertEquals( "0xE1 0x80 0x80 ", Strings.dumpBytes(StringTools.charToBytes((char) 0x1000)) );
+        assertEquals( "0xEF 0xBF 0xBF ", Strings.dumpBytes(StringTools.charToBytes((char) 0xFFFF)) );
     }
 
 



Mime
View raw message