directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r918756 [6/6] - in /directory/shared/trunk: dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/ dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ dsml-parser/src/main/java/org/apache/directory/shared/dsm...
Date Wed, 03 Mar 2010 23:05:32 GMT
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserDIRSERVER_584_Test.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserDIRSERVER_584_Test.java?rev=918756&r1=918755&r2=918756&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserDIRSERVER_584_Test.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserDIRSERVER_584_Test.java Wed Mar  3 23:05:29 2010
@@ -45,7 +45,7 @@
    {
        try
        {
-           LdapDnParser.parseInternal( "ou=test+testing", new ArrayList<RDN>() );
+           DnParser.parseInternal( "ou=test+testing", new ArrayList<RDN>() );
            fail( "should never get here" );
        }
        catch ( InvalidNameException e )
@@ -62,6 +62,6 @@
     @Test
     public void testb() throws Exception
    {
-       LdapDnParser.parseInternal( "ou=system", new ArrayList<RDN>() );
+       DnParser.parseInternal( "ou=system", new ArrayList<RDN>() );
    }
 }
\ No newline at end of file

Copied: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserTest.java (from r918714, directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDnParserTest.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserTest.java?p2=directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserTest.java&p1=directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDnParserTest.java&r1=918714&r2=918756&rev=918756&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDnParserTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserTest.java Wed Mar  3 23:05:29 2010
@@ -34,12 +34,12 @@
 
 
 /**
- * Test the class LdapDN
+ * Test the class DN
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$, 
  */
-public class LdapDnParserTest
+public class DnParserTest
 {
     // ~ Methods
     // ------------------------------------------------------------------------------------
@@ -52,9 +52,9 @@
     @Test
     public void testLdapDNEmpty() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
+        NameParser dnParser = DnParser.getNameParser();
 
-        assertEquals( "", ( ( LdapDN ) dnParser.parse( "" ) ).getName() );
+        assertEquals( "", ( ( DN ) dnParser.parse( "" ) ).getName() );
     }
 
 
@@ -64,10 +64,10 @@
     @Test
     public void testLdapDNSimple() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
+        NameParser dnParser = DnParser.getNameParser();
 
-        assertEquals( "a = b", ( ( LdapDN ) dnParser.parse( "a = b" ) ).getName() );
-        assertEquals( "a=b", ( ( LdapDN ) dnParser.parse( "a = b" ) ).toString() );
+        assertEquals( "a = b", ( ( DN ) dnParser.parse( "a = b" ) ).getName() );
+        assertEquals( "a=b", ( ( DN ) dnParser.parse( "a = b" ) ).toString() );
     }
 
 
@@ -77,8 +77,8 @@
     @Test
     public void testLdapDNComposite() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "a = b, c = d" );
+        NameParser dnParser = DnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "a = b, c = d" );
         assertEquals( "a=b,c=d", dn.toString() );
         assertEquals( "a = b, c = d", dn.getName() );
     }
@@ -90,8 +90,8 @@
     @Test
     public void testLdapDNCompositeWithSpace() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "a=b, a =b, a= b, a = b, a  =  b" );
+        NameParser dnParser = DnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "a=b, a =b, a= b, a = b, a  =  b" );
         assertEquals( "a=b,a=b,a=b,a=b,a=b", dn.toString() );
         assertEquals( "a=b, a =b, a= b, a = b, a  =  b", dn.getName() );
     }
@@ -104,8 +104,8 @@
     @Test
     public void testLdapDNCompositeSepators() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "a=b;c=d,e=f" );
+        NameParser dnParser = DnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "a=b;c=d,e=f" );
         assertEquals( "a=b,c=d,e=f", dn.toString() );
         assertEquals( "a=b;c=d,e=f", dn.getName() );
     }
@@ -117,8 +117,8 @@
     @Test
     public void testLdapDNSimpleMultivaluedAttribute() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "a = b + c = d" );
+        NameParser dnParser = DnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "a = b + c = d" );
         assertEquals( "a=b+c=d", dn.toString() );
         assertEquals( "a = b + c = d", dn.getName() );
     }
@@ -131,8 +131,8 @@
     @Test
     public void testLdapDNCompositeMultivaluedAttribute() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "a=b+c=d, e=f + g=h + i=j" );
+        NameParser dnParser = DnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "a=b+c=d, e=f + g=h + i=j" );
         assertEquals( "a=b+c=d,e=f+g=h+i=j", dn.toString() );
         assertEquals( "a=b+c=d, e=f + g=h + i=j", dn.getName() );
     }
@@ -144,8 +144,8 @@
     @Test
     public void testLdapDNOidUpper() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "OID.12.34.56 = azerty" );
+        NameParser dnParser = DnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "OID.12.34.56 = azerty" );
         assertEquals( "oid.12.34.56=azerty", dn.toString() );
         assertEquals( "OID.12.34.56 = azerty", dn.getName() );
     }
@@ -157,8 +157,8 @@
     @Test
     public void testLdapDNOidLower() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "oid.12.34.56 = azerty" );
+        NameParser dnParser = DnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "oid.12.34.56 = azerty" );
         assertEquals( "oid.12.34.56=azerty", dn.toString() );
         assertEquals( "oid.12.34.56 = azerty", dn.getName() );
     }
@@ -171,8 +171,8 @@
     @Test
     public void testLdapDNOidWithoutPrefix() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "12.34.56 = azerty" );
+        NameParser dnParser = DnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "12.34.56 = azerty" );
         assertEquals( "12.34.56=azerty", dn.toString() );
         assertEquals( "12.34.56 = azerty", dn.getName() );
     }
@@ -185,8 +185,8 @@
     @Test
     public void testLdapDNCompositeOidWithoutPrefix() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "12.34.56 = azerty; 7.8 = test" );
+        NameParser dnParser = DnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "12.34.56 = azerty; 7.8 = test" );
         assertEquals( "12.34.56=azerty,7.8=test", dn.toString() );
         assertEquals( "12.34.56 = azerty; 7.8 = test", dn.getName() );
     }
@@ -198,12 +198,12 @@
     @Test
     public void testLdapDNPairCharAttributeValue() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\\C3\\A9" );
+        NameParser dnParser = DnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\\C3\\A9" );
         assertEquals( "a=\\,=\\+\\<\\>#\\;\\\\\\\"\u00e9", dn.toString() );
         assertEquals( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\\C3\\A9", dn.getName() );
 
-        dn = ( LdapDN ) dnParser.parse( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\u00e9" );
+        dn = ( DN ) dnParser.parse( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\u00e9" );
         assertEquals( "a=\\,=\\+\\<\\>#\\;\\\\\\\"\u00e9", dn.toString() );
         assertEquals( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\u00e9", dn.getName() );
     }
@@ -215,8 +215,8 @@
     @Test
     public void testLdapDNHexStringAttributeValue() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "a = #0010A0AAFF" );
+        NameParser dnParser = DnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "a = #0010A0AAFF" );
         assertEquals( "a=#0010A0AAFF", dn.toString() );
         assertEquals( "a = #0010A0AAFF", dn.getName() );
     }
@@ -230,7 +230,7 @@
     {
         try
         {
-            NameParser dnParser = LdapDnParser.getNameParser();
+            NameParser dnParser = DnParser.getNameParser();
             dnParser.parse( "a=#zz" );
             fail();
         }
@@ -251,12 +251,12 @@
     @Test
     public void testLdapDNQuotedAttributeValue() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "a = quoted \\\"value" );
+        NameParser dnParser = DnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "a = quoted \\\"value" );
         assertEquals( "a=quoted \\\"value", dn.toString() );
         assertEquals( "a = quoted \\\"value", dn.getName() );
         
-        dn = ( LdapDN ) dnParser.parse( "cn=Mackie \\\"The Knife\\\" Messer" );
+        dn = ( DN ) dnParser.parse( "cn=Mackie \\\"The Knife\\\" Messer" );
         assertEquals( "cn=Mackie \\\"The Knife\\\" Messer", dn.toString() );
         assertEquals( "cn=Mackie \\\"The Knife\\\" Messer", dn.getName() );
     }
@@ -268,8 +268,8 @@
     @Test
     public void testLdapDNBackslashInAttributeValue() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "a = AC\\\\DC" );
+        NameParser dnParser = DnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "a = AC\\\\DC" );
         assertEquals( "a=AC\\\\DC", dn.toString() );
         assertEquals( "a = AC\\\\DC", dn.getName() );
     }
@@ -281,10 +281,10 @@
     @Test
     public void testNameToBytes() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "cn = John, ou = People, OU = Marketing" );
+        NameParser dnParser = DnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "cn = John, ou = People, OU = Marketing" );
 
-        byte[] bytes = LdapDN.getBytes( dn );
+        byte[] bytes = DN.getBytes( dn );
 
         assertEquals( 30, bytes.length );
         assertEquals( "cn=John,ou=People,ou=Marketing", StringTools.utf8ToString( bytes ) );
@@ -298,8 +298,8 @@
             { 'C', 'N', ' ', '=', ' ', 'E', 'm', 'm', 'a', 'n', 'u', 'e', 'l', ' ', ' ', 'L', ( byte ) 0xc3,
                 ( byte ) 0xa9, 'c', 'h', 'a', 'r', 'n', 'y' } );
 
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN name = ( LdapDN ) dnParser.parse( dn );
+        NameParser dnParser = DnParser.getNameParser();
+        DN name = ( DN ) dnParser.parse( dn );
 
         assertEquals( dn, name.getName() );
         assertEquals( "cn=Emmanuel  L\u00e9charny", name.toString() );
@@ -312,8 +312,8 @@
         String dn = StringTools.utf8ToString( new byte[]
             { 'C', '=', ' ', 'E', ( byte ) 0xc3, ( byte ) 0xa9, 'c' } );
 
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN name = ( LdapDN ) dnParser.parse( dn );
+        NameParser dnParser = DnParser.getNameParser();
+        DN name = ( DN ) dnParser.parse( dn );
 
         assertEquals( dn, name.getName() );
         assertEquals( "c=E\u00e9c", name.toString() );
@@ -323,8 +323,8 @@
     @Test
     public void testVsldapExtras() throws NamingException
     {
-        NameParser dnParser = LdapDnParser.getNameParser();
-        LdapDN name = ( LdapDN ) dnParser
+        NameParser dnParser = DnParser.getNameParser();
+        DN name = ( DN ) dnParser
             .parse( "cn=Billy Bakers, OID.2.5.4.11=Corporate Tax, ou=Fin-Accounting, ou=Americas, ou=Search, o=IMC, c=US" );
 
         assertEquals(
@@ -347,7 +347,7 @@
      */
     public final void testDnParser()
     {
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
 
         assertNotNull( parser );
     }
@@ -361,7 +361,7 @@
      */
     public final void testParseStringEmpty() throws NamingException
     {
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
 
         Name nameEmpty = parser.parse( "" );
 
@@ -377,7 +377,7 @@
      */
     public final void testParseStringNull() throws NamingException
     {
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
 
         Name nameNull = parser.parse( null );
 
@@ -393,14 +393,14 @@
      */
     public final void testParseStringRFC1779_1() throws NamingException
     {
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
 
         Name nameRFC1779_1 = parser
             .parse( "CN=Marshall T. Rose, O=Dover Beach Consulting, L=Santa Clara, ST=California, C=US" );
 
         assertEquals( "RFC1779_1 : ",
             "CN=Marshall T. Rose, O=Dover Beach Consulting, L=Santa Clara, ST=California, C=US",
-            ( ( LdapDN ) nameRFC1779_1 ).getName() );
+            ( ( DN ) nameRFC1779_1 ).getName() );
         assertEquals( "RFC1779_1 : ", "cn=Marshall T. Rose,o=Dover Beach Consulting,l=Santa Clara,st=California,c=US",
             nameRFC1779_1.toString() );
     }
@@ -414,11 +414,11 @@
      */
     public final void testParseStringRFC2253_1() throws NamingException
     {
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
 
         Name nameRFC2253_1 = parser.parse( "CN=Steve Kille,O=Isode limited,C=GB" );
 
-        assertEquals( "RFC2253_1 : ", "CN=Steve Kille,O=Isode limited,C=GB", ( ( LdapDN ) nameRFC2253_1 ).getName() );
+        assertEquals( "RFC2253_1 : ", "CN=Steve Kille,O=Isode limited,C=GB", ( ( DN ) nameRFC2253_1 ).getName() );
     }
 
 
@@ -430,12 +430,12 @@
      */
     public final void testParseStringRFC2253_2() throws NamingException
     {
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
 
         Name nameRFC2253_2 = parser.parse( "CN = Sales + CN =   J. Smith , O = Widget Inc. , C = US" );
 
         assertEquals( "RFC2253_2 : ", "CN = Sales + CN =   J. Smith , O = Widget Inc. , C = US",
-            ( ( LdapDN ) nameRFC2253_2 ).getName() );
+            ( ( DN ) nameRFC2253_2 ).getName() );
         assertEquals( "RFC2253_2 : ", "cn=J. Smith+cn=Sales,o=Widget Inc.,c=US", nameRFC2253_2.toString() );
     }
 
@@ -448,11 +448,11 @@
      */
     public final void testParseStringRFC2253_3() throws NamingException
     {
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
 
         Name nameRFC2253_3 = parser.parse( "CN=L. Eagle,   O=Sue\\, Grabbit and Runn, C=GB" );
 
-        assertEquals( "RFC2253_3 : ", "CN=L. Eagle,   O=Sue\\, Grabbit and Runn, C=GB", ( ( LdapDN ) nameRFC2253_3 )
+        assertEquals( "RFC2253_3 : ", "CN=L. Eagle,   O=Sue\\, Grabbit and Runn, C=GB", ( ( DN ) nameRFC2253_3 )
             .getName() );
         assertEquals( "RFC2253_3 : ", "cn=L. Eagle,o=Sue\\, Grabbit and Runn,c=GB", nameRFC2253_3.toString() );
     }
@@ -466,10 +466,10 @@
      */
     public final void testParseStringRFC2253_4() throws NamingException
     {
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
 
         Name nameRFC2253_4 = parser.parse( "CN=Before\\0DAfter,O=Test,C=GB" );
-        assertEquals( "RFC2253_4 : ", "CN=Before\\0DAfter,O=Test,C=GB", ( ( LdapDN ) nameRFC2253_4 ).getName() );
+        assertEquals( "RFC2253_4 : ", "CN=Before\\0DAfter,O=Test,C=GB", ( ( DN ) nameRFC2253_4 ).getName() );
     }
 
 
@@ -481,11 +481,11 @@
      */
     public final void testParseStringRFC2253_5() throws NamingException
     {
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
 
         Name nameRFC2253_5 = parser.parse( "1.3.6.1.4.1.1466.0=#04024869,O=Test,C=GB" );
 
-        assertEquals( "RFC2253_5 : ", "1.3.6.1.4.1.1466.0=#04024869,O=Test,C=GB", ( ( LdapDN ) nameRFC2253_5 )
+        assertEquals( "RFC2253_5 : ", "1.3.6.1.4.1.1466.0=#04024869,O=Test,C=GB", ( ( DN ) nameRFC2253_5 )
             .getName() );
     }
 
@@ -498,11 +498,11 @@
      */
     public final void testParseStringRFC2253_6() throws NamingException
     {
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
 
         Name nameRFC2253_6 = parser.parse( "SN=Lu\\C4\\8Di\\C4\\87" );
 
-        assertEquals( "RFC2253_6 : ", "SN=Lu\\C4\\8Di\\C4\\87", ( ( LdapDN ) nameRFC2253_6 ).getName() );
+        assertEquals( "RFC2253_6 : ", "SN=Lu\\C4\\8Di\\C4\\87", ( ( DN ) nameRFC2253_6 ).getName() );
     }
 
 
@@ -514,7 +514,7 @@
      */
     public final void testParseInvalidString()
     {
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
 
         try
         {
@@ -539,7 +539,7 @@
      */
     public final void testPreserveSpaceAfterEscape() throws NamingException
     {
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
         String input = "ou=some test\\,  something else";
         String result = parser.parse( input ).toString();
         assertEquals( "ou=some test\\,  something else", result );
@@ -551,9 +551,9 @@
     {
         // '\' should be escaped as stated in RFC 2253
         String path = "windowsFilePath=C:\\\\cygwin";
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
         Name result = parser.parse( path );
-        assertEquals( path, ( ( LdapDN ) result ).getName() );
+        assertEquals( path, ( ( DN ) result ).getName() );
         assertEquals( "windowsfilepath=C:\\\\cygwin", result.toString() );
     }
 
@@ -565,7 +565,7 @@
             { 'c', 'n', '=', 0x4A, ( byte ) 0xC3, ( byte ) 0xA9, 0x72, ( byte ) 0xC3, ( byte ) 0xB4, 0x6D, 0x65 },
             "UTF-8" );
 
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
         String result = parser.parse( cn ).toString();
 
         assertEquals( "cn=J\u00e9r\u00f4me", result.toString() );
@@ -580,7 +580,7 @@
                 ( byte ) 0xC3, ( byte ) 0x9F, ( byte ) 0xC3, ( byte ) 0xA4, ( byte ) 0xC3, ( byte ) 0xB6,
                 ( byte ) 0xC3, ( byte ) 0xBC }, "UTF-8" );
 
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
         String result = parser.parse( cn ).toString();
 
         assertEquals( "cn=\u00C4\u00D6\u00DC\u00DF\u00E4\u00F6\u00FC", result.toString() );
@@ -596,7 +596,7 @@
                 ( byte ) 0xC3, ( byte ) 0x9C, ( byte ) 0xC3, ( byte ) 0xBC, ( byte ) 0xC4, ( byte ) 0x9E,
                 ( byte ) 0xC4, ( byte ) 0x9F }, "UTF-8" );
 
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
         String result = parser.parse( cn ).toString();
 
         assertEquals( "cn=\u0130\u0131\u015E\u015F\u00D6\u00F6\u00DC\u00FC\u011E\u011F", result.toString() );
@@ -609,7 +609,7 @@
         String cn = new String( new byte[] { 'c', 'n', '=', (byte)0xC3, (byte)0x84, 0x5C, 0x32, 0x42 }, "UTF-8" );
 
 
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
         String result = parser.parse( cn ).toString();
         
         assertEquals( "cn=\u00c4\\+", result );
@@ -621,7 +621,7 @@
     {
         String cn = new String( new byte[] { 'c', 'n', '=', (byte)0xC3, (byte)0x84, '\\', '+' }, "UTF-8" );
         
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
         String result = parser.parse( cn ).toString();
         
         assertEquals( "cn=\u00c4\\+", result );
@@ -637,7 +637,7 @@
      */
     public final void testNonEscapedChars()
     {
-        NameParser parser = LdapDnParser.getNameParser();
+        NameParser parser = DnParser.getNameParser();
         String input = "ou=ou+test";
 
         try

Copied: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastDnParserTest.java (from r918714, directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastLdapDnParserTest.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastDnParserTest.java?p2=directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastDnParserTest.java&p1=directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastLdapDnParserTest.java&r1=918714&r2=918756&rev=918756&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastLdapDnParserTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastDnParserTest.java Wed Mar  3 23:05:29 2010
@@ -35,13 +35,13 @@
 /**
  * Tests the fast DN parser.
  * 
- * The test cases are copied from LdapDnParserTest and adjusted when an
+ * The test cases are copied from DnParserTest and adjusted when an
  * TooComplexException is expected.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 696620 $, $Date: 2008-09-18 12:09:30 +0200 (Do, 18 Sep 2008) $, 
  */
-public class FastLdapDnParserTest
+public class FastDnParserTest
 {
 
     /**
@@ -50,8 +50,8 @@
     @Test
     public void testLdapDNEmpty() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
-        assertEquals( "", ( ( LdapDN ) dnParser.parse( "" ) ).getName() );
+        NameParser dnParser = FastDnParser.getNameParser();
+        assertEquals( "", ( ( DN ) dnParser.parse( "" ) ).getName() );
     }
 
 
@@ -62,7 +62,7 @@
     @Test
     public void testLdapDNIncomplete() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
+        NameParser dnParser = FastDnParser.getNameParser();
 
         // empty DN is ok
         dnParser.parse( " " );
@@ -157,8 +157,8 @@
     @Test
     public void testLdapDNSimple() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "a = b" );
+        NameParser dnParser = FastDnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "a = b" );
 
         assertEquals( "a = b", dn.getName() );
         assertEquals( "a=b", dn.getNormName() );
@@ -183,8 +183,8 @@
     @Test
     public void testLdapDNComposite() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "a = b, c = d" );
+        NameParser dnParser = FastDnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "a = b, c = d" );
         assertEquals( "a=b,c=d", dn.toString() );
         assertEquals( "a = b, c = d", dn.getName() );
     }
@@ -196,8 +196,8 @@
     @Test
     public void testLdapDNCompositeWithSpace() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "a=b, a =b, a= b, a = b, a  =  b" );
+        NameParser dnParser = FastDnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "a=b, a =b, a= b, a = b, a  =  b" );
         assertEquals( "a=b,a=b,a=b,a=b,a=b", dn.toString() );
         assertEquals( "a=b, a =b, a= b, a = b, a  =  b", dn.getName() );
     }
@@ -210,8 +210,8 @@
     @Test
     public void testLdapDNCompositeSepators() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "a=b;c=d,e=f" );
+        NameParser dnParser = FastDnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "a=b;c=d,e=f" );
         assertEquals( "a=b,c=d,e=f", dn.toString() );
         assertEquals( "a=b;c=d,e=f", dn.getName() );
     }
@@ -223,7 +223,7 @@
     @Test
     public void testLdapDNSimpleMultivaluedAttribute() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
+        NameParser dnParser = FastDnParser.getNameParser();
         try
         {
             dnParser.parse( "a = b + c = d" );
@@ -243,7 +243,7 @@
     @Test
     public void testLdapDNCompositeMultivaluedAttribute() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
+        NameParser dnParser = FastDnParser.getNameParser();
         try
         {
             dnParser.parse( "a=b+c=d, e=f + g=h + i=j" );
@@ -262,7 +262,7 @@
     @Test
     public void testLdapDNOidUpper() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
+        NameParser dnParser = FastDnParser.getNameParser();
         try
         {
             dnParser.parse( "OID.12.34.56 = azerty" );
@@ -281,7 +281,7 @@
     @Test
     public void testLdapDNOidLower() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
+        NameParser dnParser = FastDnParser.getNameParser();
         try
         {
             dnParser.parse( "oid.12.34.56 = azerty" );
@@ -301,8 +301,8 @@
     @Test
     public void testLdapDNOidWithoutPrefix() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "12.34.56 = azerty" );
+        NameParser dnParser = FastDnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "12.34.56 = azerty" );
         assertEquals( "12.34.56=azerty", dn.toString() );
         assertEquals( "12.34.56 = azerty", dn.getName() );
     }
@@ -315,8 +315,8 @@
     @Test
     public void testLdapDNCompositeOidWithoutPrefix() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "12.34.56 = azerty; 7.8 = test" );
+        NameParser dnParser = FastDnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "12.34.56 = azerty; 7.8 = test" );
         assertEquals( "12.34.56=azerty,7.8=test", dn.toString() );
         assertEquals( "12.34.56 = azerty; 7.8 = test", dn.getName() );
     }
@@ -328,7 +328,7 @@
     @Test
     public void testLdapDNPairCharAttributeValue() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
+        NameParser dnParser = FastDnParser.getNameParser();
         try
         {
             dnParser.parse( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\\C3\\A9" );
@@ -347,7 +347,7 @@
     @Test
     public void testLdapDNHexStringAttributeValue() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
+        NameParser dnParser = FastDnParser.getNameParser();
         try
         {
             dnParser.parse( "a = #0010A0AAFF" );
@@ -368,7 +368,7 @@
     {
         try
         {
-            NameParser dnParser = FastLdapDnParser.getNameParser();
+            NameParser dnParser = FastDnParser.getNameParser();
             dnParser.parse( "a=#zz" );
             fail( "Hex DNs not supported by fast parser" );
         }
@@ -385,7 +385,7 @@
     @Test
     public void testLdapDNQuotedAttributeValue() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
+        NameParser dnParser = FastDnParser.getNameParser();
         try
         {
             dnParser.parse( "a = quoted \\\"value" );
@@ -404,10 +404,10 @@
     @Test
     public void testNameToBytes() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
-        LdapDN dn = ( LdapDN ) dnParser.parse( "cn = John, ou = People, OU = Marketing" );
+        NameParser dnParser = FastDnParser.getNameParser();
+        DN dn = ( DN ) dnParser.parse( "cn = John, ou = People, OU = Marketing" );
 
-        byte[] bytes = LdapDN.getBytes( dn );
+        byte[] bytes = DN.getBytes( dn );
 
         assertEquals( 30, bytes.length );
         assertEquals( "cn=John,ou=People,ou=Marketing", StringTools.utf8ToString( bytes ) );
@@ -421,8 +421,8 @@
             { 'C', 'N', ' ', '=', ' ', 'E', 'm', 'm', 'a', 'n', 'u', 'e', 'l', ' ', ' ', 'L', ( byte ) 0xc3,
                 ( byte ) 0xa9, 'c', 'h', 'a', 'r', 'n', 'y' } );
 
-        NameParser dnParser = FastLdapDnParser.getNameParser();
-        LdapDN name = ( LdapDN ) dnParser.parse( dn );
+        NameParser dnParser = FastDnParser.getNameParser();
+        DN name = ( DN ) dnParser.parse( dn );
 
         assertEquals( dn, name.getName() );
         assertEquals( "cn=Emmanuel  L\u00e9charny", name.toString() );
@@ -435,8 +435,8 @@
         String dn = StringTools.utf8ToString( new byte[]
             { 'C', '=', ' ', 'E', ( byte ) 0xc3, ( byte ) 0xa9, 'c' } );
 
-        NameParser dnParser = FastLdapDnParser.getNameParser();
-        LdapDN name = ( LdapDN ) dnParser.parse( dn );
+        NameParser dnParser = FastDnParser.getNameParser();
+        DN name = ( DN ) dnParser.parse( dn );
 
         assertEquals( dn, name.getName() );
         assertEquals( "c=E\u00e9c", name.toString() );
@@ -446,7 +446,7 @@
     @Test
     public void testVsldapExtras() throws NamingException
     {
-        NameParser dnParser = FastLdapDnParser.getNameParser();
+        NameParser dnParser = FastDnParser.getNameParser();
         try
         {
             dnParser
@@ -469,7 +469,7 @@
     @Test
     public final void testDnParser()
     {
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
 
         assertNotNull( parser );
     }
@@ -484,7 +484,7 @@
     @Test
     public final void testParseStringEmpty() throws NamingException
     {
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
 
         Name nameEmpty = parser.parse( "" );
 
@@ -501,7 +501,7 @@
     @Test
     public final void testParseStringNull() throws NamingException
     {
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
 
         Name nameNull = parser.parse( null );
 
@@ -518,14 +518,14 @@
     @Test
     public final void testParseStringRFC1779_1() throws NamingException
     {
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
 
         Name nameRFC1779_1 = parser
             .parse( "CN=Marshall T. Rose, O=Dover Beach Consulting, L=Santa Clara, ST=California, C=US" );
 
         assertEquals( "RFC1779_1 : ",
             "CN=Marshall T. Rose, O=Dover Beach Consulting, L=Santa Clara, ST=California, C=US",
-            ( ( LdapDN ) nameRFC1779_1 ).getName() );
+            ( ( DN ) nameRFC1779_1 ).getName() );
         assertEquals( "RFC1779_1 : ", "cn=Marshall T. Rose,o=Dover Beach Consulting,l=Santa Clara,st=California,c=US",
             nameRFC1779_1.toString() );
     }
@@ -540,11 +540,11 @@
     @Test
     public final void testParseStringRFC2253_1() throws NamingException
     {
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
 
         Name nameRFC2253_1 = parser.parse( "CN=Steve Kille,O=Isode limited,C=GB" );
 
-        assertEquals( "RFC2253_1 : ", "CN=Steve Kille,O=Isode limited,C=GB", ( ( LdapDN ) nameRFC2253_1 ).getName() );
+        assertEquals( "RFC2253_1 : ", "CN=Steve Kille,O=Isode limited,C=GB", ( ( DN ) nameRFC2253_1 ).getName() );
     }
 
 
@@ -557,7 +557,7 @@
     @Test
     public final void testParseStringRFC2253_2() throws NamingException
     {
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
 
         try
         {
@@ -580,7 +580,7 @@
     @Test
     public final void testParseStringRFC2253_3() throws NamingException
     {
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
 
         try
         {
@@ -603,7 +603,7 @@
     @Test
     public final void testParseStringRFC2253_4() throws NamingException
     {
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
 
         try
         {
@@ -626,7 +626,7 @@
     @Test
     public final void testParseStringRFC2253_5() throws NamingException
     {
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
 
         try
         {
@@ -649,7 +649,7 @@
     @Test
     public final void testParseStringRFC2253_6() throws NamingException
     {
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
 
         try
         {
@@ -672,7 +672,7 @@
     @Test
     public final void testParseInvalidString()
     {
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
 
         try
         {
@@ -698,7 +698,7 @@
     @Test
     public final void testPreserveSpaceAfterEscape() throws NamingException
     {
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
         String input = "ou=some test\\,  something else";
         try
         {
@@ -717,7 +717,7 @@
     {
         // '\' should be escaped as stated in RFC 2253
         String path = "windowsFilePath=C:\\\\cygwin";
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
         try
         {
             parser.parse( path );
@@ -737,7 +737,7 @@
             { 'c', 'n', '=', 0x4A, ( byte ) 0xC3, ( byte ) 0xA9, 0x72, ( byte ) 0xC3, ( byte ) 0xB4, 0x6D, 0x65 },
             "UTF-8" );
 
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
         String result = parser.parse( cn ).toString();
 
         assertEquals( "cn=J\u00e9r\u00f4me", result );
@@ -753,7 +753,7 @@
                 ( byte ) 0xC3, ( byte ) 0x9F, ( byte ) 0xC3, ( byte ) 0xA4, ( byte ) 0xC3, ( byte ) 0xB6,
                 ( byte ) 0xC3, ( byte ) 0xBC }, "UTF-8" );
 
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
         String result = parser.parse( cn ).toString();
 
         assertEquals( "cn=\u00C4\u00D6\u00DC\u00DF\u00E4\u00F6\u00FC", result );
@@ -769,7 +769,7 @@
                 ( byte ) 0xC3, ( byte ) 0x9C, ( byte ) 0xC3, ( byte ) 0xBC, ( byte ) 0xC4, ( byte ) 0x9E,
                 ( byte ) 0xC4, ( byte ) 0x9F }, "UTF-8" );
 
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
         String result = parser.parse( cn ).toString();
 
         assertEquals( "cn=\u0130\u0131\u015E\u015F\u00D6\u00F6\u00DC\u00FC\u011E\u011F", result );
@@ -782,7 +782,7 @@
     {
         String cn = new String( new byte[]
             { 'c', 'n', '=', ( byte ) 0xC3, ( byte ) 0x84, 0x5C, 0x32, 0x42 }, "UTF-8" );
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
         try
         {
             parser.parse( cn ).toString();
@@ -801,7 +801,7 @@
         String cn = new String( new byte[]
             { 'c', 'n', '=', ( byte ) 0xC3, ( byte ) 0x84, '\\', '+' }, "UTF-8" );
 
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
         try
         {
             parser.parse( cn ).toString();
@@ -824,7 +824,7 @@
     @Test
     public final void testNonEscapedChars() throws NamingException
     {
-        NameParser parser = FastLdapDnParser.getNameParser();
+        NameParser parser = FastDnParser.getNameParser();
         String input = "ou=ou+test";
 
         try

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParserTest.java?rev=918756&r1=918755&r2=918756&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParserTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParserTest.java Wed Mar  3 23:05:29 2010
@@ -34,7 +34,7 @@
 import org.apache.directory.shared.ldap.filter.NotNode;
 import org.apache.directory.shared.ldap.filter.OrNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecificationParser;
 import org.junit.Test;
@@ -182,22 +182,22 @@
         SubtreeSpecification ss = parser.parse( SPEC_WITH_SPECIFICEXCLUSIONS );
         assertFalse( ss.getChopBeforeExclusions().isEmpty() );
         assertFalse( ss.getChopAfterExclusions().isEmpty() );
-        assertTrue( ss.getChopBeforeExclusions().contains( new LdapDN( "ab=cd" ) ) );
-        assertTrue( ss.getChopAfterExclusions().contains( new LdapDN( "ef=gh" ) ) );
+        assertTrue( ss.getChopBeforeExclusions().contains( new DN( "ab=cd" ) ) );
+        assertTrue( ss.getChopAfterExclusions().contains( new DN( "ef=gh" ) ) );
 
         // try a second time
         ss = parser.parse( SPEC_WITH_SPECIFICEXCLUSIONS );
         assertFalse( ss.getChopBeforeExclusions().isEmpty() );
         assertFalse( ss.getChopAfterExclusions().isEmpty() );
-        assertTrue( ss.getChopBeforeExclusions().contains( new LdapDN( "ab=cd" ) ) );
-        assertTrue( ss.getChopAfterExclusions().contains( new LdapDN( "ef=gh" ) ) );
+        assertTrue( ss.getChopBeforeExclusions().contains( new DN( "ab=cd" ) ) );
+        assertTrue( ss.getChopAfterExclusions().contains( new DN( "ef=gh" ) ) );
 
         // try a third time
         ss = parser.parse( SPEC_WITH_SPECIFICEXCLUSIONS );
         assertFalse( ss.getChopBeforeExclusions().isEmpty() );
         assertFalse( ss.getChopAfterExclusions().isEmpty() );
-        assertTrue( ss.getChopBeforeExclusions().contains( new LdapDN( "ab=cd" ) ) );
-        assertTrue( ss.getChopAfterExclusions().contains( new LdapDN( "ef=gh" ) ) );
+        assertTrue( ss.getChopBeforeExclusions().contains( new DN( "ab=cd" ) ) );
+        assertTrue( ss.getChopAfterExclusions().contains( new DN( "ef=gh" ) ) );
     }
 
 
@@ -246,7 +246,7 @@
     {
         SubtreeSpecification ss = parser.parse( SPEC_WITH_BASE_AND_MINIMUM_AND_MAXIMUM );
 
-        assertEquals( new LdapDN( "ou=ORGANIZATION UNIT" ), ss.getBase() );
+        assertEquals( new DN( "ou=ORGANIZATION UNIT" ), ss.getBase() );
         assertEquals( 1, ss.getMinBaseDistance() );
         assertEquals( 2, ss.getMaxBaseDistance() );
     }
@@ -263,10 +263,10 @@
         assertNotNull( ss );
 
         assertEquals( "ou=people", ss.getBase().toString() );
-        assertTrue( ss.getChopBeforeExclusions().contains( new LdapDN( "x=y" ) ) );
-        assertTrue( ss.getChopBeforeExclusions().contains( new LdapDN( "y=z" ) ) );
-        assertTrue( ss.getChopAfterExclusions().contains( new LdapDN( "k=l" ) ) );
-        assertTrue( ss.getChopAfterExclusions().contains( new LdapDN( "l=m" ) ) );
+        assertTrue( ss.getChopBeforeExclusions().contains( new DN( "x=y" ) ) );
+        assertTrue( ss.getChopBeforeExclusions().contains( new DN( "y=z" ) ) );
+        assertTrue( ss.getChopAfterExclusions().contains( new DN( "k=l" ) ) );
+        assertTrue( ss.getChopAfterExclusions().contains( new DN( "l=m" ) ) );
         assertEquals( 7, ss.getMinBaseDistance() );
         assertEquals( 77, ss.getMaxBaseDistance() );
     }
@@ -374,13 +374,13 @@
     @Test
     public void testReusabiltiy() throws Exception
     {
-        LdapDN firstDN = new LdapDN("k=l");
+        DN firstDN = new DN("k=l");
         String firstExclusion = "{ specificExclusions { chopAfter:\"k=l\" } }";
         SubtreeSpecification firstSpec = parser.parse( firstExclusion );
         assertEquals( 1, firstSpec.getChopAfterExclusions().size() );
         assertEquals( firstDN, firstSpec.getChopAfterExclusions().iterator().next() );
 
-        LdapDN secondDN = new LdapDN("x=y");
+        DN secondDN = new DN("x=y");
         String secondExclusion = "{ specificExclusions { chopAfter:\"x=y\" } }";
         SubtreeSpecification secondSpec = parser.parse( secondExclusion );
         assertEquals( 1, secondSpec.getChopAfterExclusions().size() );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/trigger/TriggerSpecificationParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/trigger/TriggerSpecificationParserTest.java?rev=918756&r1=918755&r2=918756&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/trigger/TriggerSpecificationParserTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/trigger/TriggerSpecificationParserTest.java Wed Mar  3 23:05:29 2010
@@ -28,7 +28,7 @@
 import java.util.List;
 
 import org.apache.directory.shared.ldap.filter.SearchScope;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.trigger.TriggerSpecification.SPSpec;
 import org.junit.Test;
 
@@ -154,7 +154,7 @@
         assertEquals( theSpec.getOptions().size(), 1 );
         assertTrue( theSpec.getOptions().contains(
             new StoredProcedureSearchContextOption(
-                new LdapDN( "cn=Logger,ou=Stored Procedures,ou=system" ), SearchScope.ONELEVEL ) ) );
+                new DN( "cn=Logger,ou=Stored Procedures,ou=system" ), SearchScope.ONELEVEL ) ) );
         assertEquals( theSpec.getParameters().size(), 2 );
         assertTrue( theSpec.getParameters().contains(
             StoredProcedureParameter.ModifyDN_ENTRY.instance() ) );
@@ -186,7 +186,7 @@
         assertTrue( theSpec.getParameters().contains(
             StoredProcedureParameter.Delete_DELETED_ENTRY.instance() ) );
         assertTrue( theSpec.getParameters().contains(
-            StoredProcedureParameter.Generic_LDAP_CONTEXT.instance( new LdapDN( "ou=Backup,ou=System" ) ) ) );
+            StoredProcedureParameter.Generic_LDAP_CONTEXT.instance( new DN( "ou=Backup,ou=System" ) ) ) );
     }
     
     @Test
@@ -215,7 +215,7 @@
         assertTrue( firstSpec.getParameters().contains(
             StoredProcedureParameter.Delete_DELETED_ENTRY.instance() ) );
         assertTrue( firstSpec.getParameters().contains(
-            StoredProcedureParameter.Generic_LDAP_CONTEXT.instance( new LdapDN( "ou=Backup,ou=System" ) ) ) );
+            StoredProcedureParameter.Generic_LDAP_CONTEXT.instance( new DN( "ou=Backup,ou=System" ) ) ) );
         SPSpec secondSpec = spSpecs.get( 1 );
         assertEquals( secondSpec.getName(), "BackupUtilities.recreateDeletedEntry" );
         assertEquals( secondSpec.getOptions().size(), 0 );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/LdapUrlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/LdapUrlTest.java?rev=918756&r1=918755&r2=918756&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/LdapUrlTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/LdapUrlTest.java Wed Mar  3 23:05:29 2010
@@ -34,7 +34,7 @@
 
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.filter.SearchScope;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.LdapURL.Extension;
 import org.junit.Test;
 
@@ -62,7 +62,7 @@
      * test an empty LdapURL
      */
     @Test
-    public void testLdapDNEmpty() throws LdapURLEncodingException
+    public void testDnEmpty() throws LdapURLEncodingException
     {
         assertEquals( "ldap:///", new LdapURL( "" ).toString() );
     }
@@ -72,7 +72,7 @@
      * test a simple LdapURL
      */
     @Test
-    public void testLdapDNSimple() throws LdapURLEncodingException
+    public void testDnSimple() throws LdapURLEncodingException
     {
         assertEquals( "ldap://directory.apache.org:80/", new LdapURL( "ldap://directory.apache.org:80/" )
             .toString() );
@@ -83,7 +83,7 @@
      * test a LdapURL host 1
      */
     @Test
-    public void testLdapDNWithMinus() throws LdapURLEncodingException
+    public void testDnWithMinus() throws LdapURLEncodingException
     {
         assertEquals( "ldap://d-a.org:80/", new LdapURL( "ldap://d-a.org:80/" ).toString() );
     }
@@ -93,7 +93,7 @@
      * test a LdapURL with a bad port
      */
     @Test
-    public void testLdapDNBadPort()
+    public void testDnBadPort()
     {
         try
         {
@@ -113,7 +113,7 @@
      * test a LdapURL with a bad port 2
      */
     @Test
-    public void testLdapDNBadPort2()
+    public void testDnBadPort2()
     {
         try
         {
@@ -133,7 +133,7 @@
      * test a LdapURL with a bad port 3
      */
     @Test
-    public void testLdapDNBadPort3()
+    public void testDnBadPort3()
     {
         try
         {
@@ -153,7 +153,7 @@
      * test a LdapURL with a bad port 4
      */
     @Test
-    public void testLdapDNBadPort4()
+    public void testDnBadPort4()
     {
         try
         {
@@ -173,7 +173,7 @@
      * test a LdapURL with no host
      */
     @Test
-    public void testLdapDNBadHost1() throws LdapURLEncodingException
+    public void testDnBadHost1() throws LdapURLEncodingException
     {
         assertEquals( "ldap:///", new LdapURL( "ldap:///" ).toString() );
     }
@@ -183,7 +183,7 @@
      * test a LdapURL with a bad host 2
      */
     @Test
-    public void testLdapDNBadHost2()
+    public void testDnBadHost2()
     {
         try
         {
@@ -203,7 +203,7 @@
      * test a LdapURL with a bad host 3
      */
     @Test
-    public void testLdapDNBadHost3()
+    public void testDnBadHost3()
     {
         try
         {
@@ -223,7 +223,7 @@
      * test a LdapURL with a bad host 4
      */
     @Test
-    public void testLdapDNBadHost4()
+    public void testDnBadHost4()
     {
         try
         {
@@ -243,7 +243,7 @@
      * test a LdapURL with a bad host 5
      */
     @Test
-    public void testLdapDNBadHost5()
+    public void testDnBadHost5()
     {
         try
         {
@@ -263,7 +263,7 @@
      * test a LdapURL with a bad host 6
      */
     @Test
-    public void testLdapDNBadHost6()
+    public void testDnBadHost6()
     {
         try
         {
@@ -283,7 +283,7 @@
      * test a LdapURL with a bad host 7
      */
     @Test
-    public void testLdapDNBadHost7()
+    public void testDnBadHost7()
     {
         try
         {
@@ -303,7 +303,7 @@
      * test a LdapURL IP host
      */
     @Test
-    public void testLdapDNIPHost() throws LdapURLEncodingException
+    public void testDnIPHost() throws LdapURLEncodingException
     {
         assertEquals( "ldap://1.2.3.4/", new LdapURL( "ldap://1.2.3.4/" ).toString() );
     }
@@ -313,7 +313,7 @@
      * test a LdapURL IP host and port
      */
     @Test
-    public void testLdapDNIPHostPort() throws LdapURLEncodingException
+    public void testDnIPHostPort() throws LdapURLEncodingException
     {
         assertEquals( "ldap://1.2.3.4:80/", new LdapURL( "ldap://1.2.3.4:80/" ).toString() );
     }
@@ -323,7 +323,7 @@
      * test a LdapURL with a bad IP host 1
      */
     @Test
-    public void testLdapDNBadHostIP1()
+    public void testDnBadHostIP1()
     {
         try
         {
@@ -343,7 +343,7 @@
      * test a LdapURL with a bad IP host 2
      */
     @Test
-    public void testLdapDNBadHostIP2()
+    public void testDnBadHostIP2()
     {
         try
         {
@@ -363,7 +363,7 @@
      * test a LdapURL with a bad IP host 3
      */
     @Test
-    public void testLdapDNBadHostIP3()
+    public void testDnBadHostIP3()
     {
         try
         {
@@ -383,7 +383,7 @@
      * test a LdapURL with a bad IP host 4
      */
     @Test
-    public void testLdapDNBadHostIP4()
+    public void testDnBadHostIP4()
     {
         try
         {
@@ -403,7 +403,7 @@
      * test a LdapURL with a valid host hich is not an IP
      */
     @Test
-    public void testLdapDNNotAnIP() throws LdapURLEncodingException
+    public void testDnNotAnIP() throws LdapURLEncodingException
     {
         assertEquals( "ldap://1.1.1.100000.a/", new LdapURL( "ldap://1.1.1.100000.a/" ).toString() );
     }
@@ -413,7 +413,7 @@
      * test a LdapURL with valid simpleDN
      */
     @Test
-    public void testLdapDNSimpleDN() throws LdapURLEncodingException
+    public void testDnSimpleDN() throws LdapURLEncodingException
     {
         assertEquals( "ldap://directory.apache.org:389/dc=example,dc=org/", new LdapURL(
             "ldap://directory.apache.org:389/dc=example,dc=org/" ).toString() );
@@ -424,7 +424,7 @@
      * test a LdapURL with valid simpleDN 2
      */
     @Test
-    public void testLdapDNSimpleDN2() throws LdapURLEncodingException
+    public void testDnSimpleDN2() throws LdapURLEncodingException
     {
         assertEquals( "ldap://directory.apache.org:389/dc=example", new LdapURL(
             "ldap://directory.apache.org:389/dc=example" ).toString() );
@@ -435,7 +435,7 @@
      * test a LdapURL with a valid encoded DN
      */
     @Test
-    public void testLdapDNSimpleDNEncoded() throws LdapURLEncodingException
+    public void testDnSimpleDNEncoded() throws LdapURLEncodingException
     {
         assertEquals( "ldap://directory.apache.org:389/dc=example%202,dc=org", new LdapURL(
             "ldap://directory.apache.org:389/dc=example%202,dc=org" ).toString() );
@@ -446,7 +446,7 @@
      * test a LdapURL with an invalid DN
      */
     @Test
-    public void testLdapDNInvalidDN()
+    public void testDnInvalidDN()
     {
         try
         {
@@ -464,7 +464,7 @@
      * test a LdapURL with an invalid DN 2
      */
     @Test
-    public void testLdapDNInvalidDN2()
+    public void testDnInvalidDN2()
     {
         try
         {
@@ -482,7 +482,7 @@
      * test a LdapURL with valid unique attributes
      */
     @Test
-    public void testLdapDNUniqueAttribute() throws LdapURLEncodingException
+    public void testDnUniqueAttribute() throws LdapURLEncodingException
     {
         assertEquals( "ldap://directory.apache.org:389/dc=example,dc=org?ou", new LdapURL(
             "ldap://directory.apache.org:389/dc=example,dc=org?ou" ).toString() );
@@ -493,7 +493,7 @@
      * test a LdapURL with valid attributes
      */
     @Test
-    public void testLdapDNAttributes() throws LdapURLEncodingException
+    public void testDnAttributes() throws LdapURLEncodingException
     {
         assertEquals( "ldap://directory.apache.org:389/dc=example,dc=org?ou,objectclass,dc", new LdapURL(
             "ldap://directory.apache.org:389/dc=example,dc=org?ou,objectclass,dc" ).toString() );
@@ -504,7 +504,7 @@
      * test a LdapURL with valid duplicated attributes
      */
     @Test
-    public void testLdapDNDuplicatedAttributes() throws LdapURLEncodingException
+    public void testDnDuplicatedAttributes() throws LdapURLEncodingException
     {
         assertEquals( "ldap://directory.apache.org:389/dc=example,dc=org?ou,dc", new LdapURL(
             "ldap://directory.apache.org:389/dc=example,dc=org?ou,dc,ou" ).toString() );
@@ -650,7 +650,7 @@
      * test an empty ldaps:// LdapURL
      */
     @Test
-    public void testLdapDNEmptyLdaps() throws LdapURLEncodingException
+    public void testDnEmptyLdaps() throws LdapURLEncodingException
     {
         assertEquals( "ldaps:///", new LdapURL( "ldaps:///" ).toString() );
     }
@@ -660,7 +660,7 @@
      * test an simple ldaps:// LdapURL
      */
     @Test
-    public void testLdapDNSimpleLdaps() throws LdapURLEncodingException
+    public void testDnSimpleLdaps() throws LdapURLEncodingException
     {
         assertEquals( "ldaps://directory.apache.org:80/", new LdapURL( "ldaps://directory.apache.org:80/" )
             .toString() );
@@ -671,7 +671,7 @@
      * test the setScheme() method
      */
     @Test
-    public void testLdapDNSetScheme() throws LdapURLEncodingException
+    public void testDnSetScheme() throws LdapURLEncodingException
     {
         LdapURL url = new LdapURL();
         assertEquals( "ldap://", url.getScheme() );
@@ -694,7 +694,7 @@
      * test the setHost() method
      */
     @Test
-    public void testLdapDNSetHost() throws LdapURLEncodingException
+    public void testDnSetHost() throws LdapURLEncodingException
     {
         LdapURL url = new LdapURL();
         assertNull( url.getHost() );
@@ -713,7 +713,7 @@
      * test the setPort() method
      */
     @Test
-    public void testLdapDNSetPort() throws LdapURLEncodingException
+    public void testDnSetPort() throws LdapURLEncodingException
     {
         LdapURL url = new LdapURL();
         assertEquals( -1, url.getPort() );
@@ -736,12 +736,12 @@
      * test the setDn() method
      */
     @Test
-    public void testLdapDNSetDn() throws LdapURLEncodingException, InvalidNameException
+    public void testDnSetDn() throws LdapURLEncodingException, InvalidNameException
     {
         LdapURL url = new LdapURL();
         assertNull( url.getDn() );
 
-        LdapDN dn = new LdapDN( "dc=example,dc=com" );
+        DN dn = new DN( "dc=example,dc=com" );
         url.setDn( dn );
         assertEquals( dn, url.getDn() );
         assertEquals( "ldap:///dc=example,dc=com", url.toString() );
@@ -756,14 +756,14 @@
      * test the setAttributes() method
      */
     @Test
-    public void testLdapDNSetAttributes() throws LdapURLEncodingException, InvalidNameException
+    public void testDnSetAttributes() throws LdapURLEncodingException, InvalidNameException
     {
         LdapURL url = new LdapURL();
         assertNotNull( url.getAttributes() );
         assertTrue( url.getAttributes().isEmpty() );
 
         List<String> attributes = new ArrayList<String>();
-        url.setDn( new LdapDN( "dc=example,dc=com" ) );
+        url.setDn( new DN( "dc=example,dc=com" ) );
 
         url.setAttributes( null );
         assertNotNull( url.getAttributes() );
@@ -788,12 +788,12 @@
      * test the setScope() method
      */
     @Test
-    public void testLdapDNSetScope() throws LdapURLEncodingException, InvalidNameException
+    public void testDnSetScope() throws LdapURLEncodingException, InvalidNameException
     {
         LdapURL url = new LdapURL();
         assertEquals( SearchScope.OBJECT, url.getScope() );
 
-        url.setDn( new LdapDN( "dc=example,dc=com" ) );
+        url.setDn( new DN( "dc=example,dc=com" ) );
 
         url.setScope( SearchScope.ONELEVEL );
         assertEquals( SearchScope.ONELEVEL, url.getScope() );
@@ -813,12 +813,12 @@
      * test the setFilter() method
      */
     @Test
-    public void testLdapDNSetFilter() throws LdapURLEncodingException, InvalidNameException
+    public void testDnSetFilter() throws LdapURLEncodingException, InvalidNameException
     {
         LdapURL url = new LdapURL();
         assertNull( url.getFilter() );
 
-        url.setDn( new LdapDN( "dc=example,dc=com" ) );
+        url.setDn( new DN( "dc=example,dc=com" ) );
 
         url.setFilter( "(objectClass=person)" );
         assertEquals( "(objectClass=person)", url.getFilter() );
@@ -2113,7 +2113,7 @@
         LdapURL url1 = new LdapURL();
         url1.setHost( "localhost" );
         url1.setPort( 123 );
-        url1.setDn( LdapDN.EMPTY_LDAPDN );
+        url1.setDn( DN.EMPTY_DN );
         url1.getExtensions().add( new Extension( false, "X-CONNECTION-NAME", germanChars ) );
         assertEquals( "ldap://localhost:123/????X-CONNECTION-NAME=%c3%84%c3%96%c3%9c%c3%9f%c3%a4%c3%b6%c3%bc", url1
             .toString() );
@@ -2135,7 +2135,7 @@
         LdapURL url1 = new LdapURL();
         url1.setHost( "localhost" );
         url1.setPort( 123 );
-        url1.setDn( LdapDN.EMPTY_LDAPDN );
+        url1.setDn( DN.EMPTY_DN );
         url1.getExtensions().add( new Extension( false, "X-CONNECTION-NAME", "," ) );
         assertEquals( "ldap://localhost:123/????X-CONNECTION-NAME=%2c", url1.toString() );
 
@@ -2162,7 +2162,7 @@
         LdapURL url1 = new LdapURL();
         url1.setHost( "localhost" );
         url1.setPort( 123 );
-        url1.setDn( LdapDN.EMPTY_LDAPDN );
+        url1.setDn( DN.EMPTY_DN );
         url1.getExtensions().add( new Extension( false, "X-CONNECTION-NAME", ":/?#[]@!$&'()*+,;=" ) );
         assertEquals( "ldap://localhost:123/????X-CONNECTION-NAME=:/%3f#[]@!$&'()*+%2c;=", url1.toString() );
 
@@ -2183,7 +2183,7 @@
         LdapURL url1 = new LdapURL();
         url1.setHost( "localhost" );
         url1.setPort( 123 );
-        url1.setDn( LdapDN.EMPTY_LDAPDN );
+        url1.setDn( DN.EMPTY_DN );
         url1.getExtensions().add(
             new Extension( false, "X-CONNECTION-NAME",
                 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~" ) );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/NamespaceToolsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/NamespaceToolsTest.java?rev=918756&r1=918755&r2=918756&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/NamespaceToolsTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/NamespaceToolsTest.java Wed Mar  3 23:05:29 2010
@@ -23,7 +23,7 @@
 import javax.naming.Name;
 import javax.naming.NamingException;
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.NamespaceTools;
 import org.junit.Test;
 
@@ -111,13 +111,13 @@
     public void testGetRelativeName() throws NamingException
     {
         // test the basis case first with the root
-        LdapDN ancestor = new LdapDN( "" );
-        LdapDN descendant = new LdapDN( "ou=system" );
+        DN ancestor = new DN( "" );
+        DN descendant = new DN( "ou=system" );
         Name relativeName = NamespaceTools.getRelativeName( ancestor, descendant );
         assertEquals( relativeName.toString(), "ou=system" );
         
-        ancestor = new LdapDN( "ou=system" );
-        descendant = new LdapDN( "ou=users,ou=system" );
+        ancestor = new DN( "ou=system" );
+        descendant = new DN( "ou=users,ou=system" );
         relativeName = NamespaceTools.getRelativeName( ancestor, descendant );
         assertEquals( relativeName.toString(), "ou=users" );
     }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/tree/TestDnNode.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/tree/TestDnNode.java?rev=918756&r1=918755&r2=918756&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/tree/TestDnNode.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/tree/TestDnNode.java Wed Mar  3 23:05:29 2010
@@ -26,7 +26,7 @@
 
 import javax.naming.NamingException;
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -41,13 +41,13 @@
 public class TestDnNode
 {
     /** A structure to hold all the DNs */
-    DnBranchNode<LdapDN> dnLookupTree;
-    LdapDN dn1;
-    LdapDN dn2;
-    LdapDN dn3;
-    LdapDN dn4;
-    LdapDN dn5;
-    LdapDN dn6;
+    DnBranchNode<DN> dnLookupTree;
+    DN dn1;
+    DN dn2;
+    DN dn3;
+    DN dn4;
+    DN dn5;
+    DN dn6;
 
     /**
      * Create the elements we will test
@@ -55,14 +55,14 @@
     @Before
     public void setUp()  throws Exception
     {
-        dnLookupTree = new DnBranchNode<LdapDN>();
+        dnLookupTree = new DnBranchNode<DN>();
         
-        dn1 = new LdapDN( "dc=directory,dc=apache,dc=org" );
-        dn2 = new LdapDN( "dc=mina,dc=apache,dc=org" );
-        dn3 = new LdapDN( "dc=test,dc=com" );
-        dn4 = new LdapDN( "dc=acme,dc=com" );
-        dn5 = new LdapDN( "dc=acme,c=us,dc=com" );
-        dn6 = new LdapDN( "dc=empty" );
+        dn1 = new DN( "dc=directory,dc=apache,dc=org" );
+        dn2 = new DN( "dc=mina,dc=apache,dc=org" );
+        dn3 = new DN( "dc=test,dc=com" );
+        dn4 = new DN( "dc=acme,dc=com" );
+        dn5 = new DN( "dc=acme,c=us,dc=com" );
+        dn6 = new DN( "dc=empty" );
 
         dnLookupTree.add( dn1, dn1 );
         dnLookupTree.add( dn2, dn2 );
@@ -90,22 +90,22 @@
     @Test public void testNewTree() throws NamingException
     {
         /** A structure to hold all the DNs */
-        DnBranchNode<LdapDN> dnLookupTree = new DnBranchNode<LdapDN>();
+        DnBranchNode<DN> dnLookupTree = new DnBranchNode<DN>();
         
-        LdapDN suffix = new LdapDN( "dc=example, dc=com" );
+        DN suffix = new DN( "dc=example, dc=com" );
         
         dnLookupTree.add( suffix, suffix );
         
         assertNotNull( dnLookupTree );
         assertTrue( dnLookupTree instanceof DnBranchNode );
-        assertTrue( ((DnBranchNode<LdapDN>)dnLookupTree).contains( "dc=com" ) );
+        assertTrue( ((DnBranchNode<DN>)dnLookupTree).contains( "dc=com" ) );
         
-        DnNode<LdapDN> child = ((DnBranchNode<LdapDN>)dnLookupTree).getChild( "dc=com" );
+        DnNode<DN> child = ((DnBranchNode<DN>)dnLookupTree).getChild( "dc=com" );
         assertTrue( child instanceof DnBranchNode );
-        assertTrue( ((DnBranchNode<LdapDN>)child).contains( "dc=example" ) );
+        assertTrue( ((DnBranchNode<DN>)child).contains( "dc=example" ) );
 
-        child = ((DnBranchNode<LdapDN>)child).getChild( "dc=example" );
-        assertEquals( suffix, ((DnLeafNode<LdapDN>)child).getElement() );
+        child = ((DnBranchNode<DN>)child).getChild( "dc=example" );
+        assertEquals( suffix, ((DnLeafNode<DN>)child).getElement() );
     }
 
 
@@ -122,8 +122,8 @@
         assertTrue( dnLookupTree.hasParentElement( dn4 ) );
         assertTrue( dnLookupTree.hasParentElement( dn5 ) );
         assertTrue( dnLookupTree.hasParentElement( dn6 ) );
-        assertTrue( dnLookupTree.hasParentElement( new LdapDN( "dc=nothing,dc=empty" ) ) );
-        assertFalse( dnLookupTree.hasParentElement( new LdapDN(  "dc=directory,dc=apache,dc=root" ) ) );
+        assertTrue( dnLookupTree.hasParentElement( new DN( "dc=nothing,dc=empty" ) ) );
+        assertFalse( dnLookupTree.hasParentElement( new DN(  "dc=directory,dc=apache,dc=root" ) ) );
     }
     
     
@@ -155,8 +155,8 @@
         assertTrue( dnLookupTree.hasParentElement( dn4 ) );
         assertTrue( dnLookupTree.hasParentElement( dn5 ) );
         assertTrue( dnLookupTree.hasParentElement( dn6 ) );
-        assertTrue( dnLookupTree.hasParentElement( new LdapDN( "dc=nothing,dc=empty" ) ) );
-        assertFalse( dnLookupTree.hasParentElement( new LdapDN(  "dc=directory,dc=apache,dc=root" ) ) );
+        assertTrue( dnLookupTree.hasParentElement( new DN( "dc=nothing,dc=empty" ) ) );
+        assertFalse( dnLookupTree.hasParentElement( new DN(  "dc=directory,dc=apache,dc=root" ) ) );
 
         dnLookupTree.remove( dn6 );
         assertEquals( 4, dnLookupTree.size() );
@@ -164,16 +164,16 @@
         assertTrue( dnLookupTree.hasParentElement( dn2 ) );
         assertTrue( dnLookupTree.hasParentElement( dn4 ) );
         assertTrue( dnLookupTree.hasParentElement( dn5 ) );
-        assertFalse( dnLookupTree.hasParentElement( new LdapDN( "dc=nothing,dc=empty" ) ) );
-        assertFalse( dnLookupTree.hasParentElement( new LdapDN(  "dc=directory,dc=apache,dc=root" ) ) );
+        assertFalse( dnLookupTree.hasParentElement( new DN( "dc=nothing,dc=empty" ) ) );
+        assertFalse( dnLookupTree.hasParentElement( new DN(  "dc=directory,dc=apache,dc=root" ) ) );
 
         dnLookupTree.remove( dn1 );
         assertEquals( 3, dnLookupTree.size() );
         assertTrue( dnLookupTree.hasParentElement( dn2 ) );
         assertTrue( dnLookupTree.hasParentElement( dn4 ) );
         assertTrue( dnLookupTree.hasParentElement( dn5 ) );
-        assertFalse( dnLookupTree.hasParentElement( new LdapDN( "dc=nothing,dc=empty" ) ) );
-        assertFalse( dnLookupTree.hasParentElement( new LdapDN(  "dc=directory,dc=apache,dc=root" ) ) );
+        assertFalse( dnLookupTree.hasParentElement( new DN( "dc=nothing,dc=empty" ) ) );
+        assertFalse( dnLookupTree.hasParentElement( new DN(  "dc=directory,dc=apache,dc=root" ) ) );
 
         // Should not change anything
         dnLookupTree.remove( dn3 );
@@ -181,25 +181,25 @@
         assertTrue( dnLookupTree.hasParentElement( dn2 ) );
         assertTrue( dnLookupTree.hasParentElement( dn4 ) );
         assertTrue( dnLookupTree.hasParentElement( dn5 ) );
-        assertFalse( dnLookupTree.hasParentElement( new LdapDN( "dc=nothing,dc=empty" ) ) );
-        assertFalse( dnLookupTree.hasParentElement( new LdapDN(  "dc=directory,dc=apache,dc=root" ) ) );
+        assertFalse( dnLookupTree.hasParentElement( new DN( "dc=nothing,dc=empty" ) ) );
+        assertFalse( dnLookupTree.hasParentElement( new DN(  "dc=directory,dc=apache,dc=root" ) ) );
 
         dnLookupTree.remove( dn5 );
         assertEquals( 2, dnLookupTree.size() );
         assertTrue( dnLookupTree.hasParentElement( dn2 ) );
         assertTrue( dnLookupTree.hasParentElement( dn4 ) );
-        assertFalse( dnLookupTree.hasParentElement( new LdapDN( "dc=nothing,dc=empty" ) ) );
-        assertFalse( dnLookupTree.hasParentElement( new LdapDN(  "dc=directory,dc=apache,dc=root" ) ) );
+        assertFalse( dnLookupTree.hasParentElement( new DN( "dc=nothing,dc=empty" ) ) );
+        assertFalse( dnLookupTree.hasParentElement( new DN(  "dc=directory,dc=apache,dc=root" ) ) );
 
         dnLookupTree.remove( dn2 );
         assertEquals( 1, dnLookupTree.size() );
         assertTrue( dnLookupTree.hasParentElement( dn4 ) );
-        assertFalse( dnLookupTree.hasParentElement( new LdapDN( "dc=nothing,dc=empty" ) ) );
-        assertFalse( dnLookupTree.hasParentElement( new LdapDN(  "dc=directory,dc=apache,dc=root" ) ) );
+        assertFalse( dnLookupTree.hasParentElement( new DN( "dc=nothing,dc=empty" ) ) );
+        assertFalse( dnLookupTree.hasParentElement( new DN(  "dc=directory,dc=apache,dc=root" ) ) );
 
         dnLookupTree.remove( dn4 );
         assertEquals( 0, dnLookupTree.size() );
-        assertFalse( dnLookupTree.hasParentElement( new LdapDN( "dc=nothing,dc=empty" ) ) );
-        assertFalse( dnLookupTree.hasParentElement( new LdapDN(  "dc=directory,dc=apache,dc=root" ) ) );
+        assertFalse( dnLookupTree.hasParentElement( new DN( "dc=nothing,dc=empty" ) ) );
+        assertFalse( dnLookupTree.hasParentElement( new DN(  "dc=directory,dc=apache,dc=root" ) ) );
     }
 }



Mime
View raw message