directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r950001 - /directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java
Date Tue, 01 Jun 2010 10:21:44 GMT
Author: pamarcelot
Date: Tue Jun  1 10:21:43 2010
New Revision: 950001

URL: http://svn.apache.org/viewvc?rev=950001&view=rev
Log:
Fixed tests on Windows.

Modified:
    directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java?rev=950001&r1=950000&r2=950001&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java
(original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java
Tue Jun  1 10:21:43 2010
@@ -74,13 +74,13 @@ public class GenericIndexTest
     @Test
     public void testConstructor3()
     {
-        String tmpDir = System.getProperty( "java.io.tmpdir" );
+        File tmpDir = new File(System.getProperty( "java.io.tmpdir" ));
 
-        index = new GenericIndex<String, Long, Long>( "cn", 42, new File( tmpDir )
);
+        index = new GenericIndex<String, Long, Long>( "cn", 42, tmpDir );
         assertEquals( "cn", index.getAttributeId() );
         assertEquals( 42, index.getCacheSize() );
         assertNotNull( index.getWkDirPath() );
-        assertEquals( tmpDir, index.getWkDirPath().getPath() );
+        assertEquals( tmpDir.getPath(), index.getWkDirPath().getPath() );
     }
 
 
@@ -109,12 +109,12 @@ public class GenericIndexTest
     @Test
     public void testSetGetWkDirPath()
     {
-        String tmpDir = System.getProperty( "java.io.tmpdir" );
-        String zzzDir = tmpDir + File.separator + "zzz";
+        File tmpDir = new File( System.getProperty( "java.io.tmpdir" ));
+        File zzzDir = new File( tmpDir, "zzz"  );
 
-        index.setWkDirPath( new File( zzzDir ) );
+        index.setWkDirPath( zzzDir );
         assertNotNull( index.getWkDirPath() );
-        assertEquals( zzzDir, index.getWkDirPath().getPath() );
+        assertEquals( zzzDir.getPath(), index.getWkDirPath().getPath() );
         index.setWkDirPath( null );
         assertNull( index.getWkDirPath() );
     }



Mime
View raw message