directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r946476 - /directory/apacheds/trunk/jdbm/src/test/java/jdbm/btree/TestBTree.java
Date Wed, 19 May 2010 23:04:52 GMT
Author: elecharny
Date: Wed May 19 23:04:52 2010
New Revision: 946476

URL: http://svn.apache.org/viewvc?rev=946476&view=rev
Log:
Renamed the TestObject to avoid a failure in the test

Modified:
    directory/apacheds/trunk/jdbm/src/test/java/jdbm/btree/TestBTree.java

Modified: directory/apacheds/trunk/jdbm/src/test/java/jdbm/btree/TestBTree.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm/src/test/java/jdbm/btree/TestBTree.java?rev=946476&r1=946475&r2=946476&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm/src/test/java/jdbm/btree/TestBTree.java (original)
+++ directory/apacheds/trunk/jdbm/src/test/java/jdbm/btree/TestBTree.java Wed May 19 23:04:52
2010
@@ -312,7 +312,7 @@ public class TestBTree
         tree.insert( "test2", "value2", false );
         tree.insert( "one", Integer.valueOf( 1 ), false );
         tree.insert( "two", Long.valueOf( 2 ), false );
-        tree.insert( "myownobject", new TestObject( Integer.valueOf( 234 ) ), false );
+        tree.insert( "myownobject", new ObjectStore( Integer.valueOf( 234 ) ), false );
         
         assertEquals( "value2", tree.find( "test2" ) );
         assertEquals( "value1", tree.find( "test1" ) );
@@ -326,8 +326,8 @@ public class TestBTree
         assertEquals( "value1", tree.insert( "test1", "value11", true ) );
         assertEquals( "value11", tree.find( "test1" ) ); // now the new value!
         
-        TestObject expectedObj = new TestObject( Integer.valueOf( 234 ) );
-        TestObject btreeObj = ( TestObject ) tree.find( "myownobject" );
+        ObjectStore expectedObj = new ObjectStore( Integer.valueOf( 234 ) );
+        ObjectStore btreeObj = ( ObjectStore ) tree.find( "myownobject" );
         
         assertEquals( expectedObj, btreeObj );
         
@@ -655,17 +655,18 @@ public class TestBTree
  * implemented as inner class, as this prevents Serialization if
  * outer class is not Serializable.
  */
-class TestObject implements Serializable
+class ObjectStore implements Serializable
 {
     private static final long serialVersionUID = 1L;
 
+    
     /**
      * 
      */
     Object content;
 
 
-    public TestObject( Object content )
+    public ObjectStore( Object content )
     {
         this.content = content;
     }
@@ -679,12 +680,12 @@ class TestObject implements Serializable
 
     public boolean equals( Object obj )
     {
-        if ( !( obj instanceof TestObject ) )
+        if ( !( obj instanceof ObjectStore ) )
         {
             return false;
         }
 
-        return content.equals( ( ( TestObject ) obj ).getContent() );
+        return content.equals( ( ( ObjectStore ) obj ).getContent() );
     }
 
 



Mime
View raw message