directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r330985 - /directory/apacheds/trunk/core-unit/src/test/java/org/apache/ldap/server/jndi/ObjStateFactoryTest.java
Date Sat, 05 Nov 2005 08:31:52 GMT
Author: akarasulu
Date: Sat Nov  5 00:31:50 2005
New Revision: 330985

URL: http://svn.apache.org/viewcvs?rev=330985&view=rev
Log:
array comparision does not work: need to use complete byte by byte compare

Modified:
    directory/apacheds/trunk/core-unit/src/test/java/org/apache/ldap/server/jndi/ObjStateFactoryTest.java

Modified: directory/apacheds/trunk/core-unit/src/test/java/org/apache/ldap/server/jndi/ObjStateFactoryTest.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core-unit/src/test/java/org/apache/ldap/server/jndi/ObjStateFactoryTest.java?rev=330985&r1=330984&r2=330985&view=diff
==============================================================================
--- directory/apacheds/trunk/core-unit/src/test/java/org/apache/ldap/server/jndi/ObjStateFactoryTest.java
(original)
+++ directory/apacheds/trunk/core-unit/src/test/java/org/apache/ldap/server/jndi/ObjStateFactoryTest.java
Sat Nov  5 00:31:50 2005
@@ -31,6 +31,7 @@
 import javax.naming.spi.DirStateFactory;
 
 import org.apache.ldap.server.unit.AbstractAdminTestCase;
+import org.apache.ldap.common.util.ArrayUtils;
 
 
 /**
@@ -50,7 +51,7 @@
         Person me = ( Person ) obj;
         assertEquals( attrs.get( "sn" ).get(), me.getLastname() );
         assertEquals( attrs.get( "cn" ).get(), me.getCn() );
-        assertEquals( attrs.get( "userPassword" ).get(), "test".getBytes() );
+        assertTrue( ArrayUtils.isEquals( attrs.get( "userPassword" ).get(), "test".getBytes()
) );
         assertEquals( attrs.get( "telephonenumber" ).get(), me.getTelephoneNumber() );
         assertNull( me.getSeealso() );
         assertNull( me.getDescription() );
@@ -65,7 +66,7 @@
         Attributes attrs = super.sysRoot.getAttributes( "uid=erodriguez, ou=users" );
         assertEquals( "Rodriguez", attrs.get( "sn" ).get() );
         assertEquals( "Mr. Kerberos", attrs.get( "cn" ).get() );
-        assertEquals( "noices".getBytes(), attrs.get( "userPassword" ).get() );
+        assertTrue( ArrayUtils.isEquals( attrs.get( "userPassword" ).get(), "noices".getBytes()
) );
         assertEquals( "555-1212", attrs.get( "telephonenumber" ).get() );
         assertEquals( "erodriguez", attrs.get( "seealso" ).get() );
         assertEquals( "committer", attrs.get( "description" ).get() );



Mime
View raw message