directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r356226 - /directory/shared/ldap/branches/DN-refactoring/common/src/test/org/apache/ldap/common/name/LdapDNTest.java
Date Mon, 12 Dec 2005 09:12:09 GMT
Author: elecharny
Date: Mon Dec 12 01:12:06 2005
New Revision: 356226

URL: http://svn.apache.org/viewcvs?rev=356226&view=rev
Log:
Fixed the tests to reflect the modification done in
LdapDN and RDNParser, related to user provided DN.

Modified:
    directory/shared/ldap/branches/DN-refactoring/common/src/test/org/apache/ldap/common/name/LdapDNTest.java

Modified: directory/shared/ldap/branches/DN-refactoring/common/src/test/org/apache/ldap/common/name/LdapDNTest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/common/src/test/org/apache/ldap/common/name/LdapDNTest.java?rev=356226&r1=356225&r2=356226&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/common/src/test/org/apache/ldap/common/name/LdapDNTest.java
(original)
+++ directory/shared/ldap/branches/DN-refactoring/common/src/test/org/apache/ldap/common/name/LdapDNTest.java
Mon Dec 12 01:12:06 2005
@@ -203,7 +203,7 @@
         LdapDN dn = new LdapDN( "a=b, c=d, e=f" );
         Assert.assertEquals( "e=f", dn.remove( 0 ).toString() );
         Assert.assertEquals( "a=b,c=d", dn.toString() );
-        Assert.assertEquals( "a=b,c=d", dn.getName() );
+        Assert.assertEquals( "a=b, c=d", dn.getName() );
     }
 
     /**
@@ -213,7 +213,7 @@
     {
         LdapDN dn = new LdapDN( "a=b, c=d, e=f" );
         Assert.assertEquals( "c=d", dn.remove( 1 ).toString() );
-        Assert.assertEquals( "a=b,e=f", dn.getName() );
+        Assert.assertEquals( "a=b, e=f", dn.getName() );
     }
     
     /**
@@ -223,7 +223,7 @@
     {
         LdapDN dn = new LdapDN( "a=b, c=d, e=f" );
         Assert.assertEquals( "a=b", dn.remove( 2 ).toString() );
-        Assert.assertEquals( "c=d,e=f", dn.getName() );
+        Assert.assertEquals( " c=d, e=f", dn.getName() );
     }
 
     /**
@@ -233,7 +233,7 @@
     {
         LdapDN dn = new LdapDN( "a=b, c=d; e=f" );
         Assert.assertEquals( "c=d", dn.remove( 1 ).toString() );
-        Assert.assertEquals( "a=b,e=f", dn.getName() );
+        Assert.assertEquals( "a=b, e=f", dn.getName() );
     }
 
     /**
@@ -323,7 +323,7 @@
         
         dn.add( "e = f" );
         Assert.assertEquals( "e=f" , dn.toString() );
-        Assert.assertEquals( "e=f" , dn.getName() );
+        Assert.assertEquals( "e = f" , dn.getName() );
         Assert.assertEquals( 1, dn.size() );
     }
     
@@ -336,7 +336,7 @@
         
         dn.add( "e = f" );
         Assert.assertEquals( "e=f,a=b,c=d" , dn.toString() );
-        Assert.assertEquals( "e=f,a=b,c=d" , dn.getName() );
+        Assert.assertEquals( "e = f,a=b, c=d" , dn.getName() );
         Assert.assertEquals( 3, dn.size() );
     }
 
@@ -364,7 +364,7 @@
         LdapDN dn = new LdapDN( "a=b, c=d");
         
         dn.add( dn.size(), "e = f" );
-        Assert.assertEquals( "e=f,a=b,c=d" , dn.getName() );
+        Assert.assertEquals( "e = f,a=b, c=d" , dn.getName() );
         Assert.assertEquals( 3, dn.size() );
     }
 
@@ -376,7 +376,7 @@
         LdapDN dn = new LdapDN( "a=b, c=d");
         
         dn.add( 0, "e = f" );
-        Assert.assertEquals( "a=b,c=d,e=f" , dn.getName() );
+        Assert.assertEquals( "a=b, c=d,e = f" , dn.getName() );
         Assert.assertEquals( 3, dn.size() );
     }
 
@@ -388,7 +388,7 @@
         LdapDN dn = new LdapDN( "a=b, c=d");
         
         dn.add( 1, "e = f" );
-        Assert.assertEquals( "a=b,e=f,c=d" , dn.getName() );
+        Assert.assertEquals( "a=b,e = f, c=d" , dn.getName() );
         Assert.assertEquals( 3, dn.size() );
     }
 
@@ -402,7 +402,7 @@
         LdapDN dn = new LdapDN( "a = b" );
         LdapDN dn2 = new LdapDN( "c = d" );
         dn.addAll( dn2 );
-        Assert.assertEquals( "c=d,a=b", dn.getName() );
+        Assert.assertEquals( "c = d,a = b", dn.getName() );
     }
     
     /**
@@ -427,7 +427,7 @@
         LdapDN dn = new LdapDN();
         LdapDN dn2 = new LdapDN( "a = b" );
         dn.addAll( dn2 );
-        Assert.assertEquals( "a=b", dn.getName() );
+        Assert.assertEquals( "a = b", dn.getName() );
     }
     
     /**
@@ -439,7 +439,7 @@
         LdapDN dn = new LdapDN( "a = b" );
         LdapDN dn2 = new LdapDN( "c = d" );
         dn.addAll( 0, dn2 );
-        Assert.assertEquals( "a=b,c=d", dn.getName() );
+        Assert.assertEquals( "a = b,c = d", dn.getName() );
     }
     
     /**
@@ -451,7 +451,7 @@
         LdapDN dn = new LdapDN( "a = b" );
         LdapDN dn2 = new LdapDN( "c = d" );
         dn.addAll( 1, dn2 );
-        Assert.assertEquals( "c=d,a=b", dn.getName() );
+        Assert.assertEquals( "c = d,a = b", dn.getName() );
     }
     
     /**
@@ -463,7 +463,7 @@
         LdapDN dn = new LdapDN( "a = b, c = d" );
         LdapDN dn2 = new LdapDN( "e = f" );
         dn.addAll( 1, dn2 );
-        Assert.assertEquals( "a=b,e=f,c=d", dn.getName() );
+        Assert.assertEquals( "a = b,e = f, c = d", dn.getName() );
     }
     
     /**
@@ -488,7 +488,7 @@
         LdapDN dn = new LdapDN();
         LdapDN dn2 = new LdapDN( "a = b" );
         dn.addAll( 0, dn2 );
-        Assert.assertEquals( "a=b", dn.getName() );
+        Assert.assertEquals( "a = b", dn.getName() );
     }
     
     // GET PREFIX actions
@@ -499,7 +499,7 @@
     {
         LdapDN dn = new LdapDN( "a=b, c=d,e = f" );
         LdapDN newDn = ((LdapDN)dn.getPrefix( 0 ));
-         Assert.assertEquals( "", newDn.getName() );
+        Assert.assertEquals( "", newDn.getName() );
     }
 
     /**
@@ -509,7 +509,7 @@
     {
         LdapDN dn = new LdapDN( "a=b, c=d,e = f" );
         LdapDN newDn = ((LdapDN)dn.getPrefix( 1 ));
-        Assert.assertEquals( "e=f", newDn.getName() );
+        Assert.assertEquals( "e = f", newDn.getName() );
     }
     
     /**
@@ -519,7 +519,7 @@
     {
         LdapDN dn = new LdapDN( "a=b, c=d,e = f" );
         LdapDN newDn = ((LdapDN)dn.getPrefix( 2 ));
-        Assert.assertEquals( "c=d,e=f", newDn.getName() );
+        Assert.assertEquals( " c=d,e = f", newDn.getName() );
     }
     
     /**
@@ -529,7 +529,7 @@
     {
         LdapDN dn = new LdapDN( "a=b, c=d,e = f" );
         LdapDN newDn = ((LdapDN)dn.getPrefix( 3 ));
-        Assert.assertEquals( "a=b,c=d,e=f", newDn.getName() );
+        Assert.assertEquals( "a=b, c=d,e = f", newDn.getName() );
     }
 
     /**
@@ -569,7 +569,7 @@
     {
         LdapDN dn = new LdapDN( "a=b, c=d,e = f" );
         LdapDN newDn = ((LdapDN)dn.getSuffix( 0 ));
-         Assert.assertEquals( "a=b,c=d,e=f", newDn.getName() );
+         Assert.assertEquals( "a=b, c=d,e = f", newDn.getName() );
     }
 
     /**
@@ -579,7 +579,7 @@
     {
         LdapDN dn = new LdapDN( "a=b, c=d,e = f" );
         LdapDN newDn = ((LdapDN)dn.getSuffix( 1 ));
-        Assert.assertEquals( "a=b,c=d", newDn.getName() );
+        Assert.assertEquals( "a=b, c=d", newDn.getName() );
     }
     
     /**
@@ -1026,8 +1026,8 @@
     public void testNameComparisonIsInsensitiveToAttributesOrderFailure() throws Exception
     {
 
-        Name name1 = new LdapDN( "cn=HomeDir+cn=Workdir" );
-        Name name2 = new LdapDN( "cn=Work+cn=HomeDir" );
+        Name name1 = new LdapDN( "cn= HomeDir+cn=Workdir" );
+        Name name2 = new LdapDN( "cn = Work+cn=HomeDir" );
 
         assertEquals( -1, name1.compareTo( name2 ) );
     }



Mime
View raw message