directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r514792 - /directory/shared/branches/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
Date Mon, 05 Mar 2007 18:37:58 GMT
Author: elecharny
Date: Mon Mar  5 10:37:57 2007
New Revision: 514792

URL: http://svn.apache.org/viewvc?view=rev&rev=514792
Log:
Commented a test which was wrong (values are not anymore 
automatically normalized)
Added a test for the new getNormType() and getUpType() methods

Modified:
    directory/shared/branches/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java

Modified: directory/shared/branches/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java?view=diff&rev=514792&r1=514791&r2=514792
==============================================================================
--- directory/shared/branches/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
(original)
+++ directory/shared/branches/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
Mon Mar  5 10:37:57 2007
@@ -2311,18 +2311,18 @@
    }
 
    /**
-    * Class to test for hashCode()
+    * Class to test for hashCode(). Commmented as the values are not normalized.
     */
-   public void testLdapNameHashCode() throws Exception
-   {
-       Name name1 = new LdapDN(
-           "2.5.4.11= Some   People   + domainComponent=  And   Some anImAls,DomainComponent
= eXample,0.9.2342.19200300.100.1.25= cOm" );
-
-       Name name2 = new LdapDN(
-           "2.5.4.11=some people+domainComponent=and some animals,DomainComponent=example,0.9.2342.19200300.100.1.25=com"
);
-
-       assertEquals( name1.hashCode(), name2.hashCode() );
-   }
+   //public void testLdapNameHashCode() throws Exception
+   //{
+   //    Name name1 = new LdapDN(
+   //        "2.5.4.11= Some   People   + domainComponent=  And   Some anImAls,DomainComponent
= eXample,0.9.2342.19200300.100.1.25= cOm" );
+   //
+   //    Name name2 = new LdapDN(
+   //        "2.5.4.11=some people+domainComponent=and some animals,DomainComponent=example,0.9.2342.19200300.100.1.25=com"
);
+   //
+   //    assertEquals( name1.hashCode(), name2.hashCode() );
+   //}
 
    /**
     * Test for DIRSERVER-191
@@ -2692,4 +2692,15 @@
        assertTrue( dn.size() == 0 );
        assertTrue( dn.add( "" ).size() == 0 );
    }
+
+      
+      
+    /**
+     * This leads to the bug in DIRSERVER-832.
+     */
+    public void testPreserveAttributeIdCase() throws NamingException
+    {
+        LdapDN dn = new LdapDN( "uID=kevin" );
+        assertEquals( "uID", dn.getRdn().getUpType() );
+    }
 }



Mime
View raw message