directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1749384 - /directory/shared/branches/shared-value/integ/src/test/java/org/apache/directory/api/ldap/model/name/DnTest.java
Date Mon, 20 Jun 2016 18:53:33 GMT
Author: elecharny
Date: Mon Jun 20 18:53:33 2016
New Revision: 1749384

URL: http://svn.apache.org/viewvc?rev=1749384&view=rev
Log:
o Added a test for a Multi-AVA DN

Modified:
    directory/shared/branches/shared-value/integ/src/test/java/org/apache/directory/api/ldap/model/name/DnTest.java

Modified: directory/shared/branches/shared-value/integ/src/test/java/org/apache/directory/api/ldap/model/name/DnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/integ/src/test/java/org/apache/directory/api/ldap/model/name/DnTest.java?rev=1749384&r1=1749383&r2=1749384&view=diff
==============================================================================
--- directory/shared/branches/shared-value/integ/src/test/java/org/apache/directory/api/ldap/model/name/DnTest.java
(original)
+++ directory/shared/branches/shared-value/integ/src/test/java/org/apache/directory/api/ldap/model/name/DnTest.java
Mon Jun 20 18:53:33 2016
@@ -2038,7 +2038,7 @@ public class DnTest
 
         Dn result = new Dn( schemaManager, name );
 
-        assertEquals( "ou=Some   People+domainComponent=And   Some anImAls,DomainComponent=eXample,0.9.2342.19200300.100.1.25=cOm",
+        assertEquals( "domainComponent=And   Some anImAls+ou=Some   People,DomainComponent=eXample,0.9.2342.19200300.100.1.25=cOm",
             result.getEscaped() );
         assertEquals( "ou= Some   People   + domainComponent=  And   Some anImAls,DomainComponent
= eXample,0.9.2342.19200300.100.1.25= cOm",
             result.getName() );
@@ -2472,6 +2472,19 @@ public class DnTest
 
 
     @Test
+    public void testCompositeRDNShemaAware() throws LdapException
+    {
+        Dn dn1 = new Dn( schemaManager, "cn=abc + cn=def + cn=ghi, ou=system" );
+        Dn dn2 = new Dn( schemaManager, "cn=def + cn=abc + cn=ghi, ou=system" );
+        Dn dn3 = new Dn( schemaManager, "cn=ghi + cn=def + cn=abc, ou=system" );
+
+        assertEquals( dn1, dn2 );
+        assertEquals( dn1, dn3 );
+        assertEquals( dn2, dn3 );
+    }
+
+
+    @Test
     public void testCompositeRDNOids() throws LdapException
     {
         assertTrue( Dn
@@ -2988,11 +3001,18 @@ public class DnTest
     {
         new Dn( schemaManager, "cn=\\#\\\\\\+\\, \\\"öé\\\",ou=users,ou=system" );
     }
+
     
+    @Test
+    public void testSameAttributeInDn() throws LdapInvalidDnException
+    {
+        Dn dn = new Dn( "l=eu + l=de + l=Berlin + l=Brandenburger Tor,dc=example,dc=org"
);
+    }
+
     
     @Test
     @Ignore
-    public void testDnParsing() throws LdapInvalidDnException
+    public void testDnParsingPerf() throws LdapInvalidDnException
     {
         long[] deltas = new long[10];
         long allDeltas = 0L;
@@ -3096,7 +3116,7 @@ public class DnTest
     
     @Test
     @Ignore
-    public void testDnParsingOneRdn() throws LdapInvalidDnException
+    public void testDnParsingOneRdnPerf() throws LdapInvalidDnException
     {
         long t0 = System.currentTimeMillis();
         



Mime
View raw message