dgraham     2004/12/18 18:38:19

  Modified:    dbutils/src/test/org/apache/commons/dbutils/handlers
                        ScalarHandlerTest.java
  Log:
  Removed unnecessary casts to Object.
  
  Revision  Changes    Path
  1.4       +31 -41    
jakarta-commons/dbutils/src/test/org/apache/commons/dbutils/handlers/ScalarHandlerTest.java
  
  Index: ScalarHandlerTest.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/dbutils/src/test/org/apache/commons/dbutils/handlers/ScalarHandlerTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ScalarHandlerTest.java    28 Feb 2004 00:12:23 -0000      1.3
  +++ ScalarHandlerTest.java    19 Dec 2004 02:38:19 -0000      1.4
  @@ -20,47 +20,37 @@
   import org.apache.commons.dbutils.BaseTestCase;
   import org.apache.commons.dbutils.ResultSetHandler;
   
  -/**
  - * ScalarHandlerTest
  - */
   public class ScalarHandlerTest extends BaseTestCase {
   
  -     /**
  -      * Constructor for ScalarHandlerTest.
  -      */
  -     public ScalarHandlerTest(String name) {
  -             super(name);
  -     }
  -
  -     public void testHandle() throws SQLException {
  -             ResultSetHandler h = new ScalarHandler();
  -             Object results = (Object) h.handle(this.rs);
  -
  -             assertNotNull(results);
  -             assertEquals("1", results);
  -     }
  -
  -     public void testColumnIndexHandle() throws SQLException {
  -             ResultSetHandler h = new ScalarHandler(2);
  -             Object results = (Object) h.handle(this.rs);
  -
  -             assertNotNull(results);
  -             assertEquals("2", results);
  -     }
  -
  -     public void testColumnNameHandle() throws SQLException {
  -             ResultSetHandler h = new ScalarHandler("THree");
  -             Object results = (Object) h.handle(this.rs);
  -
  -             assertNotNull(results);
  -             assertEquals("3", results);
  -     }
  -
  -     public void testEmptyResultSetHandle() throws SQLException {
  -             ResultSetHandler h = new ScalarHandler();
  -             Object results = (Object) h.handle(this.emptyResultSet);
  +    public ScalarHandlerTest(String name) {
  +        super(name);
  +    }
  +
  +    public void testHandle() throws SQLException {
  +        ResultSetHandler h = new ScalarHandler();
  +        Object results = h.handle(this.rs);
  +        assertNotNull(results);
  +        assertEquals("1", results);
  +    }
  +
  +    public void testColumnIndexHandle() throws SQLException {
  +        ResultSetHandler h = new ScalarHandler(2);
  +        Object results = h.handle(this.rs);
  +        assertNotNull(results);
  +        assertEquals("2", results);
  +    }
  +
  +    public void testColumnNameHandle() throws SQLException {
  +        ResultSetHandler h = new ScalarHandler("THree");
  +        Object results = h.handle(this.rs);
  +        assertNotNull(results);
  +        assertEquals("3", results);
  +    }
  +
  +    public void testEmptyResultSetHandle() throws SQLException {
  +        ResultSetHandler h = new ScalarHandler();
  +        Object results = h.handle(this.emptyResultSet);
  +        assertNull(results);
  +    }
   
  -             assertNull(results);
  -     }
  -
  -}
  +}
  \ No newline at end of file
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to