commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1171779 [1/2] - in /commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils: ./ handlers/ wrappers/
Date Fri, 16 Sep 2011 21:01:31 GMT
Author: simonetripodi
Date: Fri Sep 16 21:01:30 2011
New Revision: 1171779

URL: http://svn.apache.org/viewvc?rev=1171779&view=rev
Log:
spaces in place of tabs
removed trailing spaces

Modified:
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/AsyncQueryRunnerTest.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/BasicRowProcessorTest.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSet.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSetMetaData.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/ProxyFactoryTest.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/QueryLoaderTest.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/QueryRunnerTest.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/ResultSetIteratorTest.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/TestBean.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/ArrayHandlerTest.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/ArrayListHandlerTest.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/BeanHandlerTest.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/BeanListHandlerTest.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/KeyedHandlerTest.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/MapHandlerTest.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/MapListHandlerTest.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/AsyncQueryRunnerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/AsyncQueryRunnerTest.java?rev=1171779&r1=1171778&r2=1171779&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/AsyncQueryRunnerTest.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/AsyncQueryRunnerTest.java Fri Sep 16 21:01:30 2011
@@ -41,301 +41,301 @@ import org.mockito.MockitoAnnotations;
 
 public class AsyncQueryRunnerTest {
     AsyncQueryRunner runner;
-	ArrayHandler handler;
-    
+    ArrayHandler handler;
+
     @Mock DataSource dataSource;
     @Mock Connection conn;
     @Mock PreparedStatement stmt;
     @Mock ParameterMetaData meta;
     @Mock ResultSet results;
-    
+
     @Before
     public void setUp() throws Exception {
-		MockitoAnnotations.initMocks(this);	// init the mocks
+        MockitoAnnotations.initMocks(this);    // init the mocks
 
-		when(dataSource.getConnection()).thenReturn(conn);
-		when(conn.prepareStatement(any(String.class))).thenReturn(stmt);
-		when(stmt.getParameterMetaData()).thenReturn(meta);
-		when(stmt.getResultSet()).thenReturn(results);
-		when(stmt.executeQuery()).thenReturn(results);
-		when(results.next()).thenReturn(false);
+        when(dataSource.getConnection()).thenReturn(conn);
+        when(conn.prepareStatement(any(String.class))).thenReturn(stmt);
+        when(stmt.getParameterMetaData()).thenReturn(meta);
+        when(stmt.getResultSet()).thenReturn(results);
+        when(stmt.executeQuery()).thenReturn(results);
+        when(results.next()).thenReturn(false);
 
-		 handler = new ArrayHandler();
-		 runner = new AsyncQueryRunner(dataSource);
+         handler = new ArrayHandler();
+         runner = new AsyncQueryRunner(dataSource);
     }
-    
+
     //
     // Batch test cases
     //
     private void callGoodBatch(Connection conn, Object[][] params) throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	Callable<int[]> callable = runner.batch(conn, "select * from blah where ? = ?", params);
-    	verify(stmt, times(2)).addBatch();
-    	verify(stmt, never()).close();	// make sure the statement is still open
-
-    	callable.call();
-    	verify(stmt, times(1)).executeBatch();
-    	verify(stmt, times(1)).close();	// make sure we closed the statement
-    	verify(conn, times(0)).close();	// make sure we closed the connection
+        when(meta.getParameterCount()).thenReturn(2);
+        Callable<int[]> callable = runner.batch(conn, "select * from blah where ? = ?", params);
+        verify(stmt, times(2)).addBatch();
+        verify(stmt, never()).close();    // make sure the statement is still open
+
+        callable.call();
+        verify(stmt, times(1)).executeBatch();
+        verify(stmt, times(1)).close();    // make sure we closed the statement
+        verify(conn, times(0)).close();    // make sure we closed the connection
     }
-    
+
     private void callGoodBatch(Object[][] params) throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	Callable<int[]> callable = runner.batch("select * from blah where ? = ?", params);
-    	verify(stmt, times(2)).addBatch();
-    	verify(stmt, never()).close();	// make sure the statement is still open
-
-    	callable.call();
-    	verify(stmt, times(1)).executeBatch();
-    	verify(stmt, times(1)).close();	// make sure we closed the statement
-    	verify(conn, times(1)).close();	// make sure we closed the connection
+        when(meta.getParameterCount()).thenReturn(2);
+        Callable<int[]> callable = runner.batch("select * from blah where ? = ?", params);
+        verify(stmt, times(2)).addBatch();
+        verify(stmt, never()).close();    // make sure the statement is still open
+
+        callable.call();
+        verify(stmt, times(1)).executeBatch();
+        verify(stmt, times(1)).close();    // make sure we closed the statement
+        verify(conn, times(1)).close();    // make sure we closed the connection
     }
 
     @Test
     public void testGoodBatch() throws Exception {
-    	String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
-    	
-    	callGoodBatch(params);
+        String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
+
+        callGoodBatch(params);
     }
-    
+
     @Test
     public void testGoodBatchPmdTrue() throws Exception {
-    	runner = new AsyncQueryRunner(dataSource, true);
-    	String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
-    	
-    	callGoodBatch(params);
+        runner = new AsyncQueryRunner(dataSource, true);
+        String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
+
+        callGoodBatch(params);
     }
-    
+
     @Test
     public void testGoodBatchDefaultConstructor() throws Exception {
-    	runner = new AsyncQueryRunner();
-    	String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
-    	
-    	callGoodBatch(conn, params);
+        runner = new AsyncQueryRunner();
+        String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
+
+        callGoodBatch(conn, params);
     }
 
     @Test
     public void testNullParamsBatch() throws Exception {
-    	String[][] params = new String[][] { { null, "unit" }, { "test", null } };
-    	
-    	callGoodBatch(params);
+        String[][] params = new String[][] { { null, "unit" }, { "test", null } };
+
+        callGoodBatch(params);
     }
-    
+
 
 
     // helper method for calling batch when an exception is expected
     private void callBatchWithException(String sql, Object[][] params) throws Exception {
-    	Callable<int[]> callable = null;
-    	boolean caught = false;
-    	
-    	try {
-    		callable = runner.batch(sql, params);
-        	verify(stmt, times(2)).addBatch();
-        	verify(stmt, never()).close();	// make sure the statement is still open
-
-        	callable.call();
-        	verify(stmt, times(1)).executeBatch();
-        	verify(stmt, times(1)).close();	// make sure the statement is closed
-        	verify(conn, times(1)).close();	// make sure the connection is closed
-    	} catch(Exception e) {
-    		caught = true;
-    	}
-    	
-    	if(!caught)
-    		fail("Exception never thrown, but expected");
+        Callable<int[]> callable = null;
+        boolean caught = false;
+
+        try {
+            callable = runner.batch(sql, params);
+            verify(stmt, times(2)).addBatch();
+            verify(stmt, never()).close();    // make sure the statement is still open
+
+            callable.call();
+            verify(stmt, times(1)).executeBatch();
+            verify(stmt, times(1)).close();    // make sure the statement is closed
+            verify(conn, times(1)).close();    // make sure the connection is closed
+        } catch(Exception e) {
+            caught = true;
+        }
+
+        if(!caught)
+            fail("Exception never thrown, but expected");
     }
 
     @Test
     public void testTooFewParamsBatch() throws Exception {
-    	String[][] params = new String[][] { { "unit" }, { "test" } };
-    	
-    	callBatchWithException("select * from blah where ? = ?", params);
+        String[][] params = new String[][] { { "unit" }, { "test" } };
+
+        callBatchWithException("select * from blah where ? = ?", params);
     }
 
     @Test
     public void testTooManyParamsBatch() throws Exception {
-    	String[][] params = new String[][] { { "unit", "unit", "unit" }, { "test", "test", "test" } };
-    	
-    	callBatchWithException("select * from blah where ? = ?", params);
+        String[][] params = new String[][] { { "unit", "unit", "unit" }, { "test", "test", "test" } };
+
+        callBatchWithException("select * from blah where ? = ?", params);
     }
 
     @Test(expected=SQLException.class)
     public void testNullConnectionBatch() throws Exception {
-    	String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
-    	
-    	when(meta.getParameterCount()).thenReturn(2);
-    	when(dataSource.getConnection()).thenReturn(null);
-    	
-    	runner.batch("select * from blah where ? = ?", params);
+        String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
+
+        when(meta.getParameterCount()).thenReturn(2);
+        when(dataSource.getConnection()).thenReturn(null);
+
+        runner.batch("select * from blah where ? = ?", params);
     }
 
     @Test(expected=SQLException.class)
     public void testNullSqlBatch() throws Exception {
-    	String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
-    	
-    	when(meta.getParameterCount()).thenReturn(2);
-    	
-    	runner.batch(null, params);
+        String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
+
+        when(meta.getParameterCount()).thenReturn(2);
+
+        runner.batch(null, params);
     }
 
     @Test(expected=SQLException.class)
     public void testNullParamsArgBatch() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	
-    	runner.batch("select * from blah where ? = ?", null);
+        when(meta.getParameterCount()).thenReturn(2);
+
+        runner.batch("select * from blah where ? = ?", null);
     }
 
     @Test
     public void testAddBatchException() throws Exception {
-    	String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
-    	
-    	doThrow(new SQLException()).when(stmt).addBatch();
-    	
-    	callBatchWithException("select * from blah where ? = ?", params);
+        String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
+
+        doThrow(new SQLException()).when(stmt).addBatch();
+
+        callBatchWithException("select * from blah where ? = ?", params);
     }
 
     @Test
     public void testExecuteBatchException() throws Exception {
-    	String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
-    	
-    	doThrow(new SQLException()).when(stmt).executeBatch();
-    	
-    	callBatchWithException("select * from blah where ? = ?", params);
+        String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
+
+        doThrow(new SQLException()).when(stmt).executeBatch();
+
+        callBatchWithException("select * from blah where ? = ?", params);
     }
 
-    
+
     //
     // Query test cases
     //
     private void callGoodQuery(Connection conn) throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	Callable<Object[]> callable = runner.query(conn, "select * from blah where ? = ?", handler, "unit", "test");
-    	verify(stmt, never()).close();	// make sure the statement is still open
-
-    	callable.call();
-    	verify(stmt, times(1)).executeQuery();
-    	verify(results, times(1)).close();
-    	verify(stmt, times(1)).close();	// make sure we closed the statement
-    	verify(conn, times(0)).close();	// make sure we closed the connection
-
-    	// call the other variation of query
-    	when(meta.getParameterCount()).thenReturn(0);
-    	callable = runner.query(conn, "select * from blah", handler);
-    	verify(stmt, times(1)).close();	// make sure the statement has only been closed once
-
-    	callable.call();
-    	verify(stmt, times(2)).executeQuery();
-    	verify(results, times(2)).close();
-    	verify(stmt, times(2)).close();	// make sure we closed the statement
-    	verify(conn, times(0)).close();	// make sure we closed the connection
+        when(meta.getParameterCount()).thenReturn(2);
+        Callable<Object[]> callable = runner.query(conn, "select * from blah where ? = ?", handler, "unit", "test");
+        verify(stmt, never()).close();    // make sure the statement is still open
+
+        callable.call();
+        verify(stmt, times(1)).executeQuery();
+        verify(results, times(1)).close();
+        verify(stmt, times(1)).close();    // make sure we closed the statement
+        verify(conn, times(0)).close();    // make sure we closed the connection
+
+        // call the other variation of query
+        when(meta.getParameterCount()).thenReturn(0);
+        callable = runner.query(conn, "select * from blah", handler);
+        verify(stmt, times(1)).close();    // make sure the statement has only been closed once
+
+        callable.call();
+        verify(stmt, times(2)).executeQuery();
+        verify(results, times(2)).close();
+        verify(stmt, times(2)).close();    // make sure we closed the statement
+        verify(conn, times(0)).close();    // make sure we closed the connection
     }
-    
+
     private void callGoodQuery() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	Callable<Object[]> callable = runner.query("select * from blah where ? = ?", handler, "unit", "test");
-    	verify(stmt, never()).close();	// make sure the statement is still open
-
-    	callable.call();
-    	verify(stmt, times(1)).executeQuery();
-    	verify(results, times(1)).close();
-    	verify(stmt, times(1)).close();	// make sure we closed the statement
-    	verify(conn, times(1)).close();	// make sure we closed the connection
-
-    	// call the other variation of query
-    	when(meta.getParameterCount()).thenReturn(0);
-    	callable = runner.query("select * from blah", handler);
-    	verify(stmt, times(1)).close();	// make sure the statement is still open
-
-    	callable.call();
-    	verify(stmt, times(2)).executeQuery();
-    	verify(results, times(2)).close();
-    	verify(stmt, times(2)).close();	// make sure we closed the statement
-    	verify(conn, times(2)).close();	// make sure we closed the connection
+        when(meta.getParameterCount()).thenReturn(2);
+        Callable<Object[]> callable = runner.query("select * from blah where ? = ?", handler, "unit", "test");
+        verify(stmt, never()).close();    // make sure the statement is still open
+
+        callable.call();
+        verify(stmt, times(1)).executeQuery();
+        verify(results, times(1)).close();
+        verify(stmt, times(1)).close();    // make sure we closed the statement
+        verify(conn, times(1)).close();    // make sure we closed the connection
+
+        // call the other variation of query
+        when(meta.getParameterCount()).thenReturn(0);
+        callable = runner.query("select * from blah", handler);
+        verify(stmt, times(1)).close();    // make sure the statement is still open
+
+        callable.call();
+        verify(stmt, times(2)).executeQuery();
+        verify(results, times(2)).close();
+        verify(stmt, times(2)).close();    // make sure we closed the statement
+        verify(conn, times(2)).close();    // make sure we closed the connection
     }
-    
+
     @Test
     public void testGoodQuery() throws Exception {
-    	callGoodQuery();
+        callGoodQuery();
     }
-    
+
     @Test
     public void testGoodQueryPmdTrue() throws Exception {
-    	runner = new AsyncQueryRunner(true);
-    	callGoodQuery(conn);
+        runner = new AsyncQueryRunner(true);
+        callGoodQuery(conn);
     }
-    
+
     @Test
     public void testGoodQueryDefaultConstructor() throws Exception {
-    	runner = new AsyncQueryRunner();
-    	callGoodQuery(conn);
+        runner = new AsyncQueryRunner();
+        callGoodQuery(conn);
     }
-    
+
 
     // helper method for calling batch when an exception is expected
     private void callQueryWithException(Object... params) throws Exception {
-    	Callable<Object[]> callable = null;
-    	boolean caught = false;
-    	
-    	try {
-        	when(meta.getParameterCount()).thenReturn(2);
-    		callable = runner.query("select * from blah where ? = ?", handler, params);
-        	verify(stmt, never()).close();	// make sure the statement is still open
-
-        	callable.call();
-        	verify(stmt, times(1)).executeQuery();
-        	verify(results, times(1)).close();
-        	verify(stmt, times(1)).close();	// make sure we closed the statement
-        	verify(conn, times(1)).close();	// make sure we closed the connection
-    	} catch(Exception e) {
-    		caught = true;
-    	}
-    	
-    	if(!caught)
-    		fail("Exception never thrown, but expected");
+        Callable<Object[]> callable = null;
+        boolean caught = false;
+
+        try {
+            when(meta.getParameterCount()).thenReturn(2);
+            callable = runner.query("select * from blah where ? = ?", handler, params);
+            verify(stmt, never()).close();    // make sure the statement is still open
+
+            callable.call();
+            verify(stmt, times(1)).executeQuery();
+            verify(results, times(1)).close();
+            verify(stmt, times(1)).close();    // make sure we closed the statement
+            verify(conn, times(1)).close();    // make sure we closed the connection
+        } catch(Exception e) {
+            caught = true;
+        }
+
+        if(!caught)
+            fail("Exception never thrown, but expected");
     }
 
     @Test
     public void testNoParamsQuery() throws Exception {
-    	callQueryWithException();
+        callQueryWithException();
     }
-    
+
     @Test
     public void testTooFewParamsQuery() throws Exception {
-    	callQueryWithException("unit");
+        callQueryWithException("unit");
     }
 
     @Test
     public void testTooManyParamsQuery() throws Exception {
-    	callQueryWithException("unit", "test", "fail");
+        callQueryWithException("unit", "test", "fail");
     }
 
     @Test(expected=SQLException.class)
     public void testNullConnectionQuery() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	when(dataSource.getConnection()).thenReturn(null);
-    	
-    	runner.query("select * from blah where ? = ?", handler, "unit", "test");
+        when(meta.getParameterCount()).thenReturn(2);
+        when(dataSource.getConnection()).thenReturn(null);
+
+        runner.query("select * from blah where ? = ?", handler, "unit", "test");
     }
 
     @Test(expected=SQLException.class)
     public void testNullSqlQuery() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	
-    	runner.query(null, handler);
+        when(meta.getParameterCount()).thenReturn(2);
+
+        runner.query(null, handler);
     }
 
     @Test(expected=SQLException.class)
     public void testNullHandlerQuery() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	
-    	runner.query("select * from blah where ? = ?", null);
+        when(meta.getParameterCount()).thenReturn(2);
+
+        runner.query("select * from blah where ? = ?", null);
     }
 
     @Test
     public void testExecuteQueryException() throws Exception {
-    	doThrow(new SQLException()).when(stmt).executeQuery();
-    	
-    	callQueryWithException(handler, "unit", "test");
+        doThrow(new SQLException()).when(stmt).executeQuery();
+
+        callQueryWithException(handler, "unit", "test");
     }
 
 
@@ -343,176 +343,176 @@ public class AsyncQueryRunnerTest {
     // Update test cases
     //
     private void callGoodUpdate(Connection conn) throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	Callable<Integer> callable = runner.update(conn, "update blah set ? = ?", "unit", "test");
-    	verify(stmt, never()).close();	// make sure the statement is still open
-
-    	callable.call();
-    	verify(stmt, times(1)).executeUpdate();
-    	verify(stmt, times(1)).close();	// make sure we closed the statement
-    	verify(conn, times(0)).close();	// make sure we closed the connection
-
-    	// call the other variation
-    	when(meta.getParameterCount()).thenReturn(0);
-    	callable = runner.update(conn, "update blah set unit = test");
-    	verify(stmt, times(1)).close();	// make sure the statement is still open
-
-    	callable.call();
-    	verify(stmt, times(2)).executeUpdate();
-    	verify(stmt, times(2)).close();	// make sure we closed the statement
-    	verify(conn, times(0)).close();	// make sure we closed the connection
-
-    	// call the other variation
-    	when(meta.getParameterCount()).thenReturn(1);
-    	callable = runner.update(conn, "update blah set unit = ?", "test");
-    	verify(stmt, times(2)).close();	// make sure the statement is still open
-
-    	callable.call();
-    	verify(stmt, times(3)).executeUpdate();
-    	verify(stmt, times(3)).close();	// make sure we closed the statement
-    	verify(conn, times(0)).close();	// make sure we closed the connection
+        when(meta.getParameterCount()).thenReturn(2);
+        Callable<Integer> callable = runner.update(conn, "update blah set ? = ?", "unit", "test");
+        verify(stmt, never()).close();    // make sure the statement is still open
+
+        callable.call();
+        verify(stmt, times(1)).executeUpdate();
+        verify(stmt, times(1)).close();    // make sure we closed the statement
+        verify(conn, times(0)).close();    // make sure we closed the connection
+
+        // call the other variation
+        when(meta.getParameterCount()).thenReturn(0);
+        callable = runner.update(conn, "update blah set unit = test");
+        verify(stmt, times(1)).close();    // make sure the statement is still open
+
+        callable.call();
+        verify(stmt, times(2)).executeUpdate();
+        verify(stmt, times(2)).close();    // make sure we closed the statement
+        verify(conn, times(0)).close();    // make sure we closed the connection
+
+        // call the other variation
+        when(meta.getParameterCount()).thenReturn(1);
+        callable = runner.update(conn, "update blah set unit = ?", "test");
+        verify(stmt, times(2)).close();    // make sure the statement is still open
+
+        callable.call();
+        verify(stmt, times(3)).executeUpdate();
+        verify(stmt, times(3)).close();    // make sure we closed the statement
+        verify(conn, times(0)).close();    // make sure we closed the connection
     }
-    
+
     private void callGoodUpdate() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	Callable<Integer> callable = runner.update("update blah set ? = ?", "unit", "test");
-    	verify(stmt, never()).close();	// make sure the statement is still open
-
-    	callable.call();
-    	verify(stmt, times(1)).executeUpdate();
-    	verify(stmt, times(1)).close();	// make sure we closed the statement
-    	verify(conn, times(1)).close();	// make sure we closed the connection
-
-    	// call the other variation
-    	when(meta.getParameterCount()).thenReturn(0);
-    	callable = runner.update("update blah set unit = test");
-    	verify(stmt, times(1)).close();	// make sure the statement is still open
-
-    	callable.call();
-    	verify(stmt, times(2)).executeUpdate();
-    	verify(stmt, times(2)).close();	// make sure we closed the statement
-    	verify(conn, times(2)).close();	// make sure we closed the connection
-
-    	// call the other variation
-    	when(meta.getParameterCount()).thenReturn(1);
-    	callable = runner.update("update blah set unit = ?", "test");
-    	verify(stmt, times(2)).close();	// make sure the statement is still open
-
-    	callable.call();
-    	verify(stmt, times(3)).executeUpdate();
-    	verify(stmt, times(3)).close();	// make sure we closed the statement
-    	verify(conn, times(3)).close();	// make sure we closed the connection
+        when(meta.getParameterCount()).thenReturn(2);
+        Callable<Integer> callable = runner.update("update blah set ? = ?", "unit", "test");
+        verify(stmt, never()).close();    // make sure the statement is still open
+
+        callable.call();
+        verify(stmt, times(1)).executeUpdate();
+        verify(stmt, times(1)).close();    // make sure we closed the statement
+        verify(conn, times(1)).close();    // make sure we closed the connection
+
+        // call the other variation
+        when(meta.getParameterCount()).thenReturn(0);
+        callable = runner.update("update blah set unit = test");
+        verify(stmt, times(1)).close();    // make sure the statement is still open
+
+        callable.call();
+        verify(stmt, times(2)).executeUpdate();
+        verify(stmt, times(2)).close();    // make sure we closed the statement
+        verify(conn, times(2)).close();    // make sure we closed the connection
+
+        // call the other variation
+        when(meta.getParameterCount()).thenReturn(1);
+        callable = runner.update("update blah set unit = ?", "test");
+        verify(stmt, times(2)).close();    // make sure the statement is still open
+
+        callable.call();
+        verify(stmt, times(3)).executeUpdate();
+        verify(stmt, times(3)).close();    // make sure we closed the statement
+        verify(conn, times(3)).close();    // make sure we closed the connection
     }
-    
+
     @Test
     public void testGoodUpdate() throws Exception {
-    	callGoodUpdate();
+        callGoodUpdate();
     }
-    
+
     @Test
     public void testGoodUpdatePmdTrue() throws Exception {
-    	runner = new AsyncQueryRunner(true);
-    	callGoodUpdate(conn);
+        runner = new AsyncQueryRunner(true);
+        callGoodUpdate(conn);
     }
 
     @Test
     public void testGoodUpdateDefaultConstructor() throws Exception {
-    	runner = new AsyncQueryRunner();
-    	callGoodUpdate(conn);
+        runner = new AsyncQueryRunner();
+        callGoodUpdate(conn);
     }
 
     // helper method for calling batch when an exception is expected
     private void callUpdateWithException(Object... params) throws Exception {
-    	Callable<Integer> callable = null;
-    	boolean caught = false;
-    	
-    	try {
-    		when(meta.getParameterCount()).thenReturn(2);
-    		callable = runner.update("select * from blah where ? = ?", params);
-        	verify(stmt, never()).close();	// make sure the statement is still open
-
-        	callable.call();
-        	verify(stmt, times(1)).executeUpdate();
-        	verify(stmt, times(1)).close();	// make sure we closed the statement
-        	verify(conn, times(1)).close();	// make sure we closed the connection
-    	} catch(Exception e) {
-    		caught = true;
-    	}
-    	
-    	if(!caught)
-    		fail("Exception never thrown, but expected");
+        Callable<Integer> callable = null;
+        boolean caught = false;
+
+        try {
+            when(meta.getParameterCount()).thenReturn(2);
+            callable = runner.update("select * from blah where ? = ?", params);
+            verify(stmt, never()).close();    // make sure the statement is still open
+
+            callable.call();
+            verify(stmt, times(1)).executeUpdate();
+            verify(stmt, times(1)).close();    // make sure we closed the statement
+            verify(conn, times(1)).close();    // make sure we closed the connection
+        } catch(Exception e) {
+            caught = true;
+        }
+
+        if(!caught)
+            fail("Exception never thrown, but expected");
     }
 
     @Test
     public void testNoParamsUpdate() throws Exception {
-    	callUpdateWithException();
+        callUpdateWithException();
     }
 
     @Test
     public void testTooFewParamsUpdate() throws Exception {
-    	callUpdateWithException("unit");
+        callUpdateWithException("unit");
     }
 
     @Test
     public void testTooManyParamsUpdate() throws Exception {
-    	callUpdateWithException("unit", "test", "fail");
+        callUpdateWithException("unit", "test", "fail");
     }
 
     @Test(expected=SQLException.class)
     public void testNullConnectionUpdate() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	when(dataSource.getConnection()).thenReturn(null);
-    	
-    	runner.update("select * from blah where ? = ?", "unit", "test");
+        when(meta.getParameterCount()).thenReturn(2);
+        when(dataSource.getConnection()).thenReturn(null);
+
+        runner.update("select * from blah where ? = ?", "unit", "test");
     }
 
     @Test(expected=SQLException.class)
     public void testNullSqlUpdate() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	
-    	runner.update(null);
+        when(meta.getParameterCount()).thenReturn(2);
+
+        runner.update(null);
     }
 
     @Test
     public void testExecuteUpdateException() throws Exception {
-    	doThrow(new SQLException()).when(stmt).executeUpdate();
-    	
-    	callUpdateWithException("unit", "test");
+        doThrow(new SQLException()).when(stmt).executeUpdate();
+
+        callUpdateWithException("unit", "test");
     }
-    
+
     //
     // Random tests
     //
     class MyBean {
-    	private int a;
-    	private double b;
-    	private String c;
-    	
-		public int getA() {	return a; }
-		public void setA(int a) { this.a = a; }
-		public double getB() { return b; }
-		public void setB(double b) { this.b = b; }
-		public String getC() { return c; }
-		public void setC(String c) { this.c = c; }
+        private int a;
+        private double b;
+        private String c;
+
+        public int getA() {    return a; }
+        public void setA(int a) { this.a = a; }
+        public double getB() { return b; }
+        public void setB(double b) { this.b = b; }
+        public String getC() { return c; }
+        public void setC(String c) { this.c = c; }
     }
-    
+
     @Test
     public void testFillStatementWithBean() throws Exception {
-    	MyBean bean = new MyBean();
-    	when(meta.getParameterCount()).thenReturn(3);
-    	runner.fillStatementWithBean(stmt, bean, new String[] { "a", "b", "c" });
+        MyBean bean = new MyBean();
+        when(meta.getParameterCount()).thenReturn(3);
+        runner.fillStatementWithBean(stmt, bean, new String[] { "a", "b", "c" });
     }
-    
+
     @Test(expected=NullPointerException.class)
     public void testFillStatementWithBeanNullNames() throws Exception {
-    	MyBean bean = new MyBean();
-    	when(meta.getParameterCount()).thenReturn(3);
-    	runner.fillStatementWithBean(stmt, bean, new String[] { "a", "b", null });
+        MyBean bean = new MyBean();
+        when(meta.getParameterCount()).thenReturn(3);
+        runner.fillStatementWithBean(stmt, bean, new String[] { "a", "b", null });
     }
-    
+
     @Test(expected=SQLException.class)
     public void testBadPrepareConnection() throws Exception {
-    	runner = new AsyncQueryRunner();
-    	runner.update("update blah set unit = test");
+        runner = new AsyncQueryRunner();
+        runner.update("update blah set unit = test");
     }
 }

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/BasicRowProcessorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/BasicRowProcessorTest.java?rev=1171779&r1=1171778&r2=1171779&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/BasicRowProcessorTest.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/BasicRowProcessorTest.java Fri Sep 16 21:01:30 2011
@@ -30,11 +30,11 @@ import java.util.Map;
 public class BasicRowProcessorTest extends BaseTestCase {
 
     private static final RowProcessor processor = new BasicRowProcessor();
-    
+
     /**
      * Format that matches Date.toString().
      * Sun Mar 14 15:19:15 MST 2004
-     */ 
+     */
     private static final DateFormat datef =
         new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);
 
@@ -47,7 +47,7 @@ public class BasicRowProcessorTest exten
         assertEquals("1", a[0]);
         assertEquals("2", a[1]);
         assertEquals("3", a[2]);
-            
+
         assertTrue(this.rs.next());
         a = processor.toArray(this.rs);
         assertEquals(COLS, a.length);
@@ -55,7 +55,7 @@ public class BasicRowProcessorTest exten
         assertEquals("4", a[0]);
         assertEquals("5", a[1]);
         assertEquals("6", a[2]);
-            
+
         assertFalse(this.rs.next());
     }
 
@@ -68,7 +68,7 @@ public class BasicRowProcessorTest exten
         assertEquals("2", row.getTwo());
         assertEquals("3", row.getThree());
         assertEquals("not set", row.getDoNotSet());
-            
+
         assertTrue(this.rs.next());
         row = processor.toBean(this.rs, TestBean.class);
 
@@ -84,9 +84,9 @@ public class BasicRowProcessorTest exten
         assertNotNull(row.getNotDate());
         assertTrue(!"not a date".equals(row.getNotDate()));
         datef.parse(row.getNotDate());
-        
+
         assertFalse(this.rs.next());
-        
+
     }
 
     public void testToBeanList() throws SQLException, ParseException {
@@ -100,7 +100,7 @@ public class BasicRowProcessorTest exten
         assertEquals("2", b.getTwo());
         assertEquals("3", b.getThree());
         assertEquals("not set", b.getDoNotSet());
-        
+
         b = list.get(1);
         assertEquals("4", b.getOne());
         assertEquals("5", b.getTwo());
@@ -124,7 +124,7 @@ public class BasicRowProcessorTest exten
         assertEquals("1", m.get("one"));
         assertEquals("2", m.get("TWO"));
         assertEquals("3", m.get("Three"));
-            
+
         assertTrue(this.rs.next());
         m = processor.toMap(this.rs);
         assertEquals(COLS, m.keySet().size());
@@ -132,7 +132,7 @@ public class BasicRowProcessorTest exten
         assertEquals("4", m.get("One")); // case shouldn't matter
         assertEquals("5", m.get("two"));
         assertEquals("6", m.get("THREE"));
-            
+
         assertFalse(this.rs.next());
     }
 

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSet.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSet.java?rev=1171779&r1=1171778&r2=1171779&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSet.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSet.java Fri Sep 16 21:01:30 2011
@@ -36,11 +36,11 @@ public class MockResultSet implements In
      * <pre>
      * ProxyFactory.instance().createResultSet(new MockResultSet(metaData, rows));
      * </pre>
-     * 
+     *
      * @param metaData
      * @param rows A null value indicates an empty <code>ResultSet</code>.
      */
-    public static ResultSet create(ResultSetMetaData metaData, 
+    public static ResultSet create(ResultSetMetaData metaData,
             Object[][] rows) {
         return ProxyFactory.instance().createResultSet(
             new MockResultSet(metaData, rows));
@@ -63,7 +63,7 @@ public class MockResultSet implements In
         super();
         this.metaData = metaData;
         if (rows == null) {
-            List<Object[]> empty = Collections.emptyList(); 
+            List<Object[]> empty = Collections.emptyList();
             this.iter = empty.iterator();
         } else {
             this.iter = Arrays.asList(rows).iterator();
@@ -309,15 +309,15 @@ public class MockResultSet implements In
 
         } else if (methodName.equals("isLast")) {
             return this.isLast();
-        
+
         } else if (methodName.equals("hashCode")) {
             return Integer.valueOf(System.identityHashCode(proxy));
-        
+
         } else if (methodName.equals("toString")) {
             return "MockResultSet " + System.identityHashCode(proxy);
 
-        } else if (methodName.equals("equals")) { 
-            return Boolean.valueOf(proxy == args[0]); 
+        } else if (methodName.equals("equals")) {
+            return Boolean.valueOf(proxy == args[0]);
         }
 
         throw new UnsupportedOperationException("Unsupported method: " + methodName);

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSetMetaData.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSetMetaData.java?rev=1171779&r1=1171778&r2=1171779&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSetMetaData.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSetMetaData.java Fri Sep 16 21:01:30 2011
@@ -21,7 +21,7 @@ import java.lang.reflect.Method;
 import java.sql.ResultSetMetaData;
 
 /**
- * MockResultSetMetaData dynamically implements the ResultSetMetaData 
+ * MockResultSetMetaData dynamically implements the ResultSetMetaData
  * interface.
  */
 public class MockResultSetMetaData implements InvocationHandler {
@@ -30,12 +30,12 @@ public class MockResultSetMetaData imple
     private String[] columnLabels = null;
 
     /**
-     * Create a <code>MockResultSetMetaData</code> proxy object.  This is 
+     * Create a <code>MockResultSetMetaData</code> proxy object.  This is
      * equivalent to:
      * <pre>
      * ProxyFactory.instance().createResultSetMetaData(new MockResultSetMetaData(columnNames));
      * </pre>
-     * 
+     *
      * @param columnNames
      * @return the proxy object
      */
@@ -50,7 +50,7 @@ public class MockResultSetMetaData imple
         this.columnLabels = new String[columnNames.length];
 
     }
-    
+
     public MockResultSetMetaData(String[] columnNames, String[] columnLabels) {
         super();
         this.columnNames = columnNames;
@@ -73,7 +73,7 @@ public class MockResultSetMetaData imple
                 return this.columnNames[col];
 
         } else if (
-        		methodName.equals("getColumnLabel")) {
+                methodName.equals("getColumnLabel")) {
 
                 int col = ((Integer) args[0]).intValue() - 1;
                 return this.columnLabels[col];
@@ -84,8 +84,8 @@ public class MockResultSetMetaData imple
         } else if (methodName.equals("toString")) {
             return "MockResultSetMetaData " + System.identityHashCode(proxy);
 
-        } else if (methodName.equals("equals")) { 
-            return Boolean.valueOf(proxy == args[0]); 
+        } else if (methodName.equals("equals")) {
+            return Boolean.valueOf(proxy == args[0]);
 
         } else {
             throw new UnsupportedOperationException("Unsupported method: " + methodName);

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/ProxyFactoryTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/ProxyFactoryTest.java?rev=1171779&r1=1171778&r2=1171779&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/ProxyFactoryTest.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/ProxyFactoryTest.java Fri Sep 16 21:01:30 2011
@@ -25,41 +25,41 @@ import java.lang.reflect.Method;
  */
 public class ProxyFactoryTest extends BaseTestCase {
 
-	private static final InvocationHandler stub = new InvocationHandler() {
+    private static final InvocationHandler stub = new InvocationHandler() {
 
-		public Object invoke(Object proxy, Method method, Object[] args)
-			throws Throwable {
+        public Object invoke(Object proxy, Method method, Object[] args)
+            throws Throwable {
 
-			return null;
-		}
-	};
-
-	public void testCreateConnection() {
-		assertNotNull(ProxyFactory.instance().createConnection(stub));
-	}
-
-	public void testCreateDriver() {
-		assertNotNull(ProxyFactory.instance().createDriver(stub));
-	}
-
-	public void testCreatePreparedStatement() {
-		assertNotNull(ProxyFactory.instance().createPreparedStatement(stub));
-	}
-
-	public void testCreateResultSet() {
-		assertNotNull(ProxyFactory.instance().createResultSet(stub));
-	}
-
-	public void testCreateResultSetMetaData() {
-		assertNotNull(ProxyFactory.instance().createResultSetMetaData(stub));
-	}
-
-	public void testCreateStatement() {
-		assertNotNull(ProxyFactory.instance().createStatement(stub));
-	}
-
-	public void testCreateCallableStatement() {
-		assertNotNull(ProxyFactory.instance().createCallableStatement(stub));
-	}
+            return null;
+        }
+    };
+
+    public void testCreateConnection() {
+        assertNotNull(ProxyFactory.instance().createConnection(stub));
+    }
+
+    public void testCreateDriver() {
+        assertNotNull(ProxyFactory.instance().createDriver(stub));
+    }
+
+    public void testCreatePreparedStatement() {
+        assertNotNull(ProxyFactory.instance().createPreparedStatement(stub));
+    }
+
+    public void testCreateResultSet() {
+        assertNotNull(ProxyFactory.instance().createResultSet(stub));
+    }
+
+    public void testCreateResultSetMetaData() {
+        assertNotNull(ProxyFactory.instance().createResultSetMetaData(stub));
+    }
+
+    public void testCreateStatement() {
+        assertNotNull(ProxyFactory.instance().createStatement(stub));
+    }
+
+    public void testCreateCallableStatement() {
+        assertNotNull(ProxyFactory.instance().createCallableStatement(stub));
+    }
 
 }

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/QueryLoaderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/QueryLoaderTest.java?rev=1171779&r1=1171778&r2=1171779&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/QueryLoaderTest.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/QueryLoaderTest.java Fri Sep 16 21:01:30 2011
@@ -40,8 +40,8 @@ public class QueryLoaderTest extends Bas
             assertTrue(q != q3); // pointer comparison should return false
 
         } catch (IllegalArgumentException e) {
-            // TODO Figure out why the Maven build can't find the properties 
-            // file.  The tests run fine in Eclipse so just catch this 
+            // TODO Figure out why the Maven build can't find the properties
+            // file.  The tests run fine in Eclipse so just catch this
             // exception for now.
         }
     }

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/QueryRunnerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/QueryRunnerTest.java?rev=1171779&r1=1171778&r2=1171779&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/QueryRunnerTest.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/QueryRunnerTest.java Fri Sep 16 21:01:30 2011
@@ -40,287 +40,287 @@ import org.mockito.MockitoAnnotations;
 
 public class QueryRunnerTest {
     QueryRunner runner;
-	ArrayHandler handler;
-    
+    ArrayHandler handler;
+
     @Mock DataSource dataSource;
     @Mock Connection conn;
     @Mock PreparedStatement stmt;
     @Mock ParameterMetaData meta;
     @Mock ResultSet results;
-    
+
     @Before
     public void setUp() throws Exception {
-		MockitoAnnotations.initMocks(this);	// init the mocks
+        MockitoAnnotations.initMocks(this);    // init the mocks
 
-		when(dataSource.getConnection()).thenReturn(conn);
-		when(conn.prepareStatement(any(String.class))).thenReturn(stmt);
-		when(stmt.getParameterMetaData()).thenReturn(meta);
-		when(stmt.getResultSet()).thenReturn(results);
-		when(stmt.executeQuery()).thenReturn(results);
-		when(results.next()).thenReturn(false);
+        when(dataSource.getConnection()).thenReturn(conn);
+        when(conn.prepareStatement(any(String.class))).thenReturn(stmt);
+        when(stmt.getParameterMetaData()).thenReturn(meta);
+        when(stmt.getResultSet()).thenReturn(results);
+        when(stmt.executeQuery()).thenReturn(results);
+        when(results.next()).thenReturn(false);
 
-		 handler = new ArrayHandler();
-		 runner = new QueryRunner(dataSource);
+         handler = new ArrayHandler();
+         runner = new QueryRunner(dataSource);
     }
-    
+
     //
     // Batch test cases
     //
-    
+
     private void callGoodBatch(Connection conn, Object[][] params) throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	int[] ret = runner.batch(conn, "select * from blah where ? = ?", params);
+        when(meta.getParameterCount()).thenReturn(2);
+        int[] ret = runner.batch(conn, "select * from blah where ? = ?", params);
 
-    	verify(stmt, times(2)).addBatch();
-    	verify(stmt, times(1)).executeBatch();
-    	verify(stmt, times(1)).close();	// make sure we closed the statement
-    	verify(conn, times(0)).close();	// make sure we closed the connection
+        verify(stmt, times(2)).addBatch();
+        verify(stmt, times(1)).executeBatch();
+        verify(stmt, times(1)).close();    // make sure we closed the statement
+        verify(conn, times(0)).close();    // make sure we closed the connection
     }
-    
+
     private void callGoodBatch(Object[][] params) throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	int[] ret = runner.batch("select * from blah where ? = ?", params);
+        when(meta.getParameterCount()).thenReturn(2);
+        int[] ret = runner.batch("select * from blah where ? = ?", params);
 
-    	verify(stmt, times(2)).addBatch();
-    	verify(stmt, times(1)).executeBatch();
-    	verify(stmt, times(1)).close();	// make sure we closed the statement
-    	verify(conn, times(1)).close();	// make sure we closed the connection
+        verify(stmt, times(2)).addBatch();
+        verify(stmt, times(1)).executeBatch();
+        verify(stmt, times(1)).close();    // make sure we closed the statement
+        verify(conn, times(1)).close();    // make sure we closed the connection
     }
 
     @Test
     public void testGoodBatch() throws Exception {
-    	String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
-    	
-    	callGoodBatch(params);
+        String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
+
+        callGoodBatch(params);
     }
-    
+
     @Test
     public void testGoodBatchPmdTrue() throws Exception {
-    	runner = new QueryRunner(dataSource, true);
-    	String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
-    	
-    	callGoodBatch(params);
+        runner = new QueryRunner(dataSource, true);
+        String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
+
+        callGoodBatch(params);
     }
-    
+
     @Test
     public void testGoodBatchDefaultConstructor() throws Exception {
-    	runner = new QueryRunner();
-    	String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
-    	
-    	callGoodBatch(conn, params);
+        runner = new QueryRunner();
+        String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
+
+        callGoodBatch(conn, params);
     }
 
     @Test
     public void testNullParamsBatch() throws Exception {
-    	String[][] params = new String[][] { { null, "unit" }, { "test", null } };
-    	
-    	callGoodBatch(params);
+        String[][] params = new String[][] { { null, "unit" }, { "test", null } };
+
+        callGoodBatch(params);
     }
-    
+
 
 
     // helper method for calling batch when an exception is expected
     private void callBatchWithException(String sql, Object[][] params) throws Exception {
-    	int[] ret = null;
-    	boolean caught = false;
-    	
-    	try {
-    		ret = runner.batch(sql, params);
-
-    		verify(stmt, times(2)).addBatch();
-        	verify(stmt, times(1)).executeBatch();
-        	verify(stmt, times(1)).close();	// make sure the statement is closed
-        	verify(conn, times(1)).close();	// make sure the connection is closed
-    	} catch(SQLException e) {
-    		caught = true;
-    	}
-    	
-    	if(!caught)
-    		fail("Exception never thrown, but expected");
+        int[] ret = null;
+        boolean caught = false;
+
+        try {
+            ret = runner.batch(sql, params);
+
+            verify(stmt, times(2)).addBatch();
+            verify(stmt, times(1)).executeBatch();
+            verify(stmt, times(1)).close();    // make sure the statement is closed
+            verify(conn, times(1)).close();    // make sure the connection is closed
+        } catch(SQLException e) {
+            caught = true;
+        }
+
+        if(!caught)
+            fail("Exception never thrown, but expected");
     }
 
     @Test
     public void testTooFewParamsBatch() throws Exception {
-    	String[][] params = new String[][] { { "unit" }, { "test" } };
-    	
-    	callBatchWithException("select * from blah where ? = ?", params);
+        String[][] params = new String[][] { { "unit" }, { "test" } };
+
+        callBatchWithException("select * from blah where ? = ?", params);
     }
 
     @Test
     public void testTooManyParamsBatch() throws Exception {
-    	String[][] params = new String[][] { { "unit", "unit", "unit" }, { "test", "test", "test" } };
-    	
-    	callBatchWithException("select * from blah where ? = ?", params);
+        String[][] params = new String[][] { { "unit", "unit", "unit" }, { "test", "test", "test" } };
+
+        callBatchWithException("select * from blah where ? = ?", params);
     }
 
     @Test(expected=SQLException.class)
     public void testNullConnectionBatch() throws Exception {
-    	String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
-    	
-    	when(meta.getParameterCount()).thenReturn(2);
-    	when(dataSource.getConnection()).thenReturn(null);
-    	
-    	runner.batch("select * from blah where ? = ?", params);
+        String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
+
+        when(meta.getParameterCount()).thenReturn(2);
+        when(dataSource.getConnection()).thenReturn(null);
+
+        runner.batch("select * from blah where ? = ?", params);
     }
 
     @Test(expected=SQLException.class)
     public void testNullSqlBatch() throws Exception {
-    	String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
-    	
-    	when(meta.getParameterCount()).thenReturn(2);
-    	
-    	runner.batch(null, params);
+        String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
+
+        when(meta.getParameterCount()).thenReturn(2);
+
+        runner.batch(null, params);
     }
 
     @Test(expected=SQLException.class)
     public void testNullParamsArgBatch() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	
-    	runner.batch("select * from blah where ? = ?", null);
+        when(meta.getParameterCount()).thenReturn(2);
+
+        runner.batch("select * from blah where ? = ?", null);
     }
 
     @Test
     public void testAddBatchException() throws Exception {
-    	String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
-    	
-    	doThrow(new SQLException()).when(stmt).addBatch();
-    	
-    	callBatchWithException("select * from blah where ? = ?", params);
+        String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
+
+        doThrow(new SQLException()).when(stmt).addBatch();
+
+        callBatchWithException("select * from blah where ? = ?", params);
     }
 
     @Test
     public void testExecuteBatchException() throws Exception {
-    	String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
-    	
-    	doThrow(new SQLException()).when(stmt).executeBatch();
-    	
-    	callBatchWithException("select * from blah where ? = ?", params);
+        String[][] params = new String[][] { { "unit", "unit" }, { "test", "test" } };
+
+        doThrow(new SQLException()).when(stmt).executeBatch();
+
+        callBatchWithException("select * from blah where ? = ?", params);
     }
 
-    
+
     //
     // Query test cases
     //
     private void callGoodQuery(Connection conn) throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	Object[] ret = runner.query(conn, "select * from blah where ? = ?", handler, "unit", "test");
+        when(meta.getParameterCount()).thenReturn(2);
+        Object[] ret = runner.query(conn, "select * from blah where ? = ?", handler, "unit", "test");
 
-    	verify(stmt, times(1)).executeQuery();
-    	verify(results, times(1)).close();
-    	verify(stmt, times(1)).close();	// make sure we closed the statement
-    	verify(conn, times(0)).close();	// make sure we closed the connection
-
-    	// call the other variation of query
-    	when(meta.getParameterCount()).thenReturn(0);
-    	ret = runner.query(conn, "select * from blah", handler);
-
-    	verify(stmt, times(2)).executeQuery();
-    	verify(results, times(2)).close();
-    	verify(stmt, times(2)).close();	// make sure we closed the statement
-    	verify(conn, times(0)).close();	// make sure we closed the connection
+        verify(stmt, times(1)).executeQuery();
+        verify(results, times(1)).close();
+        verify(stmt, times(1)).close();    // make sure we closed the statement
+        verify(conn, times(0)).close();    // make sure we closed the connection
+
+        // call the other variation of query
+        when(meta.getParameterCount()).thenReturn(0);
+        ret = runner.query(conn, "select * from blah", handler);
+
+        verify(stmt, times(2)).executeQuery();
+        verify(results, times(2)).close();
+        verify(stmt, times(2)).close();    // make sure we closed the statement
+        verify(conn, times(0)).close();    // make sure we closed the connection
     }
-    
+
     private void callGoodQuery() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	Object[] ret = runner.query("select * from blah where ? = ?", handler, "unit", "test");
+        when(meta.getParameterCount()).thenReturn(2);
+        Object[] ret = runner.query("select * from blah where ? = ?", handler, "unit", "test");
 
-    	verify(stmt, times(1)).executeQuery();
-    	verify(results, times(1)).close();
-    	verify(stmt, times(1)).close();	// make sure we closed the statement
-    	verify(conn, times(1)).close();	// make sure we closed the connection
-
-    	// call the other variation of query
-    	when(meta.getParameterCount()).thenReturn(0);
-    	ret = runner.query("select * from blah", handler);
-
-    	verify(stmt, times(2)).executeQuery();
-    	verify(results, times(2)).close();
-    	verify(stmt, times(2)).close();	// make sure we closed the statement
-    	verify(conn, times(2)).close();	// make sure we closed the connection
+        verify(stmt, times(1)).executeQuery();
+        verify(results, times(1)).close();
+        verify(stmt, times(1)).close();    // make sure we closed the statement
+        verify(conn, times(1)).close();    // make sure we closed the connection
+
+        // call the other variation of query
+        when(meta.getParameterCount()).thenReturn(0);
+        ret = runner.query("select * from blah", handler);
+
+        verify(stmt, times(2)).executeQuery();
+        verify(results, times(2)).close();
+        verify(stmt, times(2)).close();    // make sure we closed the statement
+        verify(conn, times(2)).close();    // make sure we closed the connection
     }
-    
+
     @Test
     public void testGoodQuery() throws Exception {
-    	callGoodQuery();
+        callGoodQuery();
     }
-    
+
     @Test
     public void testGoodQueryPmdTrue() throws Exception {
-    	runner = new QueryRunner(true);
-    	callGoodQuery(conn);
+        runner = new QueryRunner(true);
+        callGoodQuery(conn);
     }
-    
+
     @Test
     public void testGoodQueryDefaultConstructor() throws Exception {
-    	runner = new QueryRunner();
-    	callGoodQuery(conn);
+        runner = new QueryRunner();
+        callGoodQuery(conn);
     }
-    
+
 
     // helper method for calling batch when an exception is expected
     private void callQueryWithException(Object... params) throws Exception {
-    	Object[] ret = null;
-    	boolean caught = false;
-    	
-    	try {
-        	when(meta.getParameterCount()).thenReturn(2);
-    		ret = runner.query("select * from blah where ? = ?", handler, params);
-
-    		verify(stmt, never()).close();	// make sure the statement is still open
-        	verify(stmt, times(1)).executeQuery();
-        	verify(results, times(1)).close();
-        	verify(stmt, times(1)).close();	// make sure we closed the statement
-        	verify(conn, times(1)).close();	// make sure we closed the connection
-    	} catch(SQLException e) {
-    		caught = true;
-    	}
-    	
-    	if(!caught)
-    		fail("Exception never thrown, but expected");
+        Object[] ret = null;
+        boolean caught = false;
+
+        try {
+            when(meta.getParameterCount()).thenReturn(2);
+            ret = runner.query("select * from blah where ? = ?", handler, params);
+
+            verify(stmt, never()).close();    // make sure the statement is still open
+            verify(stmt, times(1)).executeQuery();
+            verify(results, times(1)).close();
+            verify(stmt, times(1)).close();    // make sure we closed the statement
+            verify(conn, times(1)).close();    // make sure we closed the connection
+        } catch(SQLException e) {
+            caught = true;
+        }
+
+        if(!caught)
+            fail("Exception never thrown, but expected");
     }
 
     @Test
     public void testNoParamsQuery() throws Exception {
-    	callQueryWithException();
+        callQueryWithException();
     }
-    
+
     @Test
     public void testTooFewParamsQuery() throws Exception {
-    	callQueryWithException("unit");
+        callQueryWithException("unit");
     }
 
     @Test
     public void testTooManyParamsQuery() throws Exception {
-    	callQueryWithException("unit", "test", "fail");
+        callQueryWithException("unit", "test", "fail");
     }
 
     @Test(expected=SQLException.class)
     public void testNullConnectionQuery() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	when(dataSource.getConnection()).thenReturn(null);
-    	
-    	runner.query("select * from blah where ? = ?", handler, "unit", "test");
+        when(meta.getParameterCount()).thenReturn(2);
+        when(dataSource.getConnection()).thenReturn(null);
+
+        runner.query("select * from blah where ? = ?", handler, "unit", "test");
     }
 
     @Test(expected=SQLException.class)
     public void testNullSqlQuery() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	
-    	runner.query(null, handler);
+        when(meta.getParameterCount()).thenReturn(2);
+
+        runner.query(null, handler);
     }
 
     @Test(expected=SQLException.class)
     public void testNullHandlerQuery() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	
-    	runner.query("select * from blah where ? = ?", null);
+        when(meta.getParameterCount()).thenReturn(2);
+
+        runner.query("select * from blah where ? = ?", null);
     }
 
     @Test
     public void testExecuteQueryException() throws Exception {
-    	doThrow(new SQLException()).when(stmt).executeQuery();
-    	
-    	callQueryWithException(handler, "unit", "test");
+        doThrow(new SQLException()).when(stmt).executeQuery();
+
+        callQueryWithException(handler, "unit", "test");
     }
 
 
@@ -328,162 +328,162 @@ public class QueryRunnerTest {
     // Update test cases
     //
     private void callGoodUpdate(Connection conn) throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	Integer ret = runner.update(conn, "update blah set ? = ?", "unit", "test");
+        when(meta.getParameterCount()).thenReturn(2);
+        Integer ret = runner.update(conn, "update blah set ? = ?", "unit", "test");
 
-    	verify(stmt, times(1)).executeUpdate();
-    	verify(stmt, times(1)).close();	// make sure we closed the statement
-    	verify(conn, times(0)).close();	// make sure we closed the connection
-
-    	// call the other variation
-    	when(meta.getParameterCount()).thenReturn(0);
-    	ret = runner.update(conn, "update blah set unit = test");
-
-    	verify(stmt, times(2)).executeUpdate();
-    	verify(stmt, times(2)).close();	// make sure we closed the statement
-    	verify(conn, times(0)).close();	// make sure we closed the connection
-
-    	// call the other variation
-    	when(meta.getParameterCount()).thenReturn(1);
-    	ret = runner.update(conn, "update blah set unit = ?", "test");
-
-    	verify(stmt, times(3)).executeUpdate();
-    	verify(stmt, times(3)).close();	// make sure we closed the statement
-    	verify(conn, times(0)).close();	// make sure we closed the connection
+        verify(stmt, times(1)).executeUpdate();
+        verify(stmt, times(1)).close();    // make sure we closed the statement
+        verify(conn, times(0)).close();    // make sure we closed the connection
+
+        // call the other variation
+        when(meta.getParameterCount()).thenReturn(0);
+        ret = runner.update(conn, "update blah set unit = test");
+
+        verify(stmt, times(2)).executeUpdate();
+        verify(stmt, times(2)).close();    // make sure we closed the statement
+        verify(conn, times(0)).close();    // make sure we closed the connection
+
+        // call the other variation
+        when(meta.getParameterCount()).thenReturn(1);
+        ret = runner.update(conn, "update blah set unit = ?", "test");
+
+        verify(stmt, times(3)).executeUpdate();
+        verify(stmt, times(3)).close();    // make sure we closed the statement
+        verify(conn, times(0)).close();    // make sure we closed the connection
     }
-    
+
     private void callGoodUpdate() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	Integer ret = runner.update("update blah set ? = ?", "unit", "test");
+        when(meta.getParameterCount()).thenReturn(2);
+        Integer ret = runner.update("update blah set ? = ?", "unit", "test");
 
-    	verify(stmt, times(1)).executeUpdate();
-    	verify(stmt, times(1)).close();	// make sure we closed the statement
-    	verify(conn, times(1)).close();	// make sure we closed the connection
-
-    	// call the other variation
-    	when(meta.getParameterCount()).thenReturn(0);
-    	ret = runner.update("update blah set unit = test");
-
-    	verify(stmt, times(2)).executeUpdate();
-    	verify(stmt, times(2)).close();	// make sure we closed the statement
-    	verify(conn, times(2)).close();	// make sure we closed the connection
-
-    	// call the other variation
-    	when(meta.getParameterCount()).thenReturn(1);
-    	ret = runner.update("update blah set unit = ?", "test");
-
-    	verify(stmt, times(3)).executeUpdate();
-    	verify(stmt, times(3)).close();	// make sure we closed the statement
-    	verify(conn, times(3)).close();	// make sure we closed the connection
+        verify(stmt, times(1)).executeUpdate();
+        verify(stmt, times(1)).close();    // make sure we closed the statement
+        verify(conn, times(1)).close();    // make sure we closed the connection
+
+        // call the other variation
+        when(meta.getParameterCount()).thenReturn(0);
+        ret = runner.update("update blah set unit = test");
+
+        verify(stmt, times(2)).executeUpdate();
+        verify(stmt, times(2)).close();    // make sure we closed the statement
+        verify(conn, times(2)).close();    // make sure we closed the connection
+
+        // call the other variation
+        when(meta.getParameterCount()).thenReturn(1);
+        ret = runner.update("update blah set unit = ?", "test");
+
+        verify(stmt, times(3)).executeUpdate();
+        verify(stmt, times(3)).close();    // make sure we closed the statement
+        verify(conn, times(3)).close();    // make sure we closed the connection
     }
-    
+
     @Test
     public void testGoodUpdate() throws Exception {
-    	callGoodUpdate();
+        callGoodUpdate();
     }
-    
+
     @Test
     public void testGoodUpdatePmdTrue() throws Exception {
-    	runner = new QueryRunner(true);
-    	callGoodUpdate(conn);
+        runner = new QueryRunner(true);
+        callGoodUpdate(conn);
     }
 
     @Test
     public void testGoodUpdateDefaultConstructor() throws Exception {
-    	runner = new QueryRunner();
-    	callGoodUpdate(conn);
+        runner = new QueryRunner();
+        callGoodUpdate(conn);
     }
 
     // helper method for calling batch when an exception is expected
     private void callUpdateWithException(Object... params) throws Exception {
-    	Integer ret = null;
-    	boolean caught = false;
-    	
-    	try {
-    		when(meta.getParameterCount()).thenReturn(2);
-    		ret = runner.update("select * from blah where ? = ?", params);
-
-        	verify(stmt, times(1)).executeUpdate();
-        	verify(stmt, times(1)).close();	// make sure we closed the statement
-        	verify(conn, times(1)).close();	// make sure we closed the connection
-    	} catch(SQLException e) {
-    		caught = true;
-    	}
-    	
-    	if(!caught)
-    		fail("Exception never thrown, but expected");
+        Integer ret = null;
+        boolean caught = false;
+
+        try {
+            when(meta.getParameterCount()).thenReturn(2);
+            ret = runner.update("select * from blah where ? = ?", params);
+
+            verify(stmt, times(1)).executeUpdate();
+            verify(stmt, times(1)).close();    // make sure we closed the statement
+            verify(conn, times(1)).close();    // make sure we closed the connection
+        } catch(SQLException e) {
+            caught = true;
+        }
+
+        if(!caught)
+            fail("Exception never thrown, but expected");
     }
 
     @Test
     public void testNoParamsUpdate() throws Exception {
-    	callUpdateWithException();
+        callUpdateWithException();
     }
 
     @Test
     public void testTooFewParamsUpdate() throws Exception {
-    	callUpdateWithException("unit");
+        callUpdateWithException("unit");
     }
 
     @Test
     public void testTooManyParamsUpdate() throws Exception {
-    	callUpdateWithException("unit", "test", "fail");
+        callUpdateWithException("unit", "test", "fail");
     }
 
     @Test(expected=SQLException.class)
     public void testNullConnectionUpdate() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	when(dataSource.getConnection()).thenReturn(null);
-    	
-    	runner.update("select * from blah where ? = ?", "unit", "test");
+        when(meta.getParameterCount()).thenReturn(2);
+        when(dataSource.getConnection()).thenReturn(null);
+
+        runner.update("select * from blah where ? = ?", "unit", "test");
     }
 
     @Test(expected=SQLException.class)
     public void testNullSqlUpdate() throws Exception {
-    	when(meta.getParameterCount()).thenReturn(2);
-    	
-    	runner.update(null);
+        when(meta.getParameterCount()).thenReturn(2);
+
+        runner.update(null);
     }
 
     @Test
     public void testExecuteUpdateException() throws Exception {
-    	doThrow(new SQLException()).when(stmt).executeUpdate();
-    	
-    	callUpdateWithException("unit", "test");
+        doThrow(new SQLException()).when(stmt).executeUpdate();
+
+        callUpdateWithException("unit", "test");
     }
-    
+
     //
     // Random tests
     //
     class MyBean {
-    	private int a;
-    	private double b;
-    	private String c;
-    	
-		public int getA() {	return a; }
-		public void setA(int a) { this.a = a; }
-		public double getB() { return b; }
-		public void setB(double b) { this.b = b; }
-		public String getC() { return c; }
-		public void setC(String c) { this.c = c; }
+        private int a;
+        private double b;
+        private String c;
+
+        public int getA() {    return a; }
+        public void setA(int a) { this.a = a; }
+        public double getB() { return b; }
+        public void setB(double b) { this.b = b; }
+        public String getC() { return c; }
+        public void setC(String c) { this.c = c; }
     }
-    
+
     @Test
     public void testFillStatementWithBean() throws Exception {
-    	MyBean bean = new MyBean();
-    	when(meta.getParameterCount()).thenReturn(3);
-    	runner.fillStatementWithBean(stmt, bean, new String[] { "a", "b", "c" });
+        MyBean bean = new MyBean();
+        when(meta.getParameterCount()).thenReturn(3);
+        runner.fillStatementWithBean(stmt, bean, new String[] { "a", "b", "c" });
     }
-    
+
     @Test(expected=NullPointerException.class)
     public void testFillStatementWithBeanNullNames() throws Exception {
-    	MyBean bean = new MyBean();
-    	when(meta.getParameterCount()).thenReturn(3);
-    	runner.fillStatementWithBean(stmt, bean, new String[] { "a", "b", null });
+        MyBean bean = new MyBean();
+        when(meta.getParameterCount()).thenReturn(3);
+        runner.fillStatementWithBean(stmt, bean, new String[] { "a", "b", null });
     }
-    
+
     @Test(expected=SQLException.class)
     public void testBadPrepareConnection() throws Exception {
-    	runner = new QueryRunner();
-    	runner.update("update blah set unit = test");
+        runner = new QueryRunner();
+        runner.update("update blah set unit = test");
     }
 }

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/ResultSetIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/ResultSetIteratorTest.java?rev=1171779&r1=1171778&r2=1171779&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/ResultSetIteratorTest.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/ResultSetIteratorTest.java Fri Sep 16 21:01:30 2011
@@ -23,27 +23,27 @@ import java.util.Iterator;
  */
 public class ResultSetIteratorTest extends BaseTestCase {
 
-	public void testNext() {
-		
-		Iterator<Object[]> iter = new ResultSetIterator(this.rs);
-
-		Object[] row = null;
-		assertTrue(iter.hasNext());
-		row = iter.next();
-		assertEquals(COLS, row.length);
-		assertEquals("1", row[0]);
-		assertEquals("2", row[1]);
-		assertEquals("3", row[2]);
-		
-		assertTrue(iter.hasNext());
-		row = iter.next();
-		assertEquals(COLS, row.length);
-
-		assertEquals("4", row[0]);
-		assertEquals("5", row[1]);
-		assertEquals("6", row[2]);
-		
-		assertFalse(iter.hasNext());
-	}
+    public void testNext() {
+
+        Iterator<Object[]> iter = new ResultSetIterator(this.rs);
+
+        Object[] row = null;
+        assertTrue(iter.hasNext());
+        row = iter.next();
+        assertEquals(COLS, row.length);
+        assertEquals("1", row[0]);
+        assertEquals("2", row[1]);
+        assertEquals("3", row[2]);
+
+        assertTrue(iter.hasNext());
+        row = iter.next();
+        assertEquals(COLS, row.length);
+
+        assertEquals("4", row[0]);
+        assertEquals("5", row[1]);
+        assertEquals("6", row[2]);
+
+        assertFalse(iter.hasNext());
+    }
 
 }

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/TestBean.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/TestBean.java?rev=1171779&r1=1171778&r2=1171779&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/TestBean.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/TestBean.java Fri Sep 16 21:01:30 2011
@@ -34,7 +34,7 @@ public class TestBean {
     private String doNotSet = "not set";
 
     /**
-     * toBean() should set primitive fields to their defaults (ie. 0) when 
+     * toBean() should set primitive fields to their defaults (ie. 0) when
      * null is returned from the ResultSet.
      */
     private int nullPrimitiveTest = 7;
@@ -50,9 +50,9 @@ public class TestBean {
      * BeanProcessor should create a String from the Date and set this property.
      */
     private String notDate = "not a date";
-    
+
     /**
-     * The ResultSet will have a BigDecimal in this column and the 
+     * The ResultSet will have a BigDecimal in this column and the
      * BasicColumnProcessor should convert that to a double and store the value
      * in this property.
      */

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/ArrayHandlerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/ArrayHandlerTest.java?rev=1171779&r1=1171778&r2=1171779&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/ArrayHandlerTest.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/ArrayHandlerTest.java Fri Sep 16 21:01:30 2011
@@ -26,21 +26,21 @@ import org.apache.commons.dbutils.Result
  */
 public class ArrayHandlerTest extends BaseTestCase {
 
-	public void testHandle() throws SQLException {
-		ResultSetHandler<Object[]> h = new ArrayHandler();
-		Object[] results = h.handle(this.rs);
-        
-		assertNotNull(results);
-		assertEquals(COLS, results.length);
-		assertEquals("1", results[0]);
-		assertEquals("2", results[1]);
-		assertEquals("3", results[2]);
-	}
-    
+    public void testHandle() throws SQLException {
+        ResultSetHandler<Object[]> h = new ArrayHandler();
+        Object[] results = h.handle(this.rs);
+
+        assertNotNull(results);
+        assertEquals(COLS, results.length);
+        assertEquals("1", results[0]);
+        assertEquals("2", results[1]);
+        assertEquals("3", results[2]);
+    }
+
     public void testEmptyResultSetHandle() throws SQLException {
         ResultSetHandler<Object[]> h = new ArrayHandler();
         Object[] results = h.handle(this.emptyResultSet);
-        
+
         assertNull(results);
     }
 

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/ArrayListHandlerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/ArrayListHandlerTest.java?rev=1171779&r1=1171778&r2=1171779&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/ArrayListHandlerTest.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/ArrayListHandlerTest.java Fri Sep 16 21:01:30 2011
@@ -28,39 +28,39 @@ import org.apache.commons.dbutils.Result
  */
 public class ArrayListHandlerTest extends BaseTestCase {
 
-	public void testHandle() throws SQLException {
-		ResultSetHandler<List<Object[]>> h = new ArrayListHandler();
-		List<Object[]> results = h.handle(this.rs);
-
-		assertNotNull(results);
-		assertEquals(ROWS, results.size());
-
-		Iterator<Object[]> iter = results.iterator();
-	    Object[] row = null;
-	    assertTrue(iter.hasNext());
-	    row = iter.next();
-	    assertEquals(COLS, row.length);
-	    assertEquals("1", row[0]);
-	    assertEquals("2", row[1]);
-	    assertEquals("3", row[2]);
-	        
-	    assertTrue(iter.hasNext());
-	    row = iter.next();
-	    assertEquals(COLS, row.length);
-
-	    assertEquals("4", row[0]);
-	    assertEquals("5", row[1]);
-	    assertEquals("6", row[2]);
-	        
-	    assertFalse(iter.hasNext());
-	}
-
-	public void testEmptyResultSetHandle() throws SQLException {
-		ResultSetHandler<List<Object[]>> h = new ArrayListHandler();
-		List<Object[]> results = h.handle(this.emptyResultSet);
-
-		assertNotNull(results);
-		assertTrue(results.isEmpty());
-	}
+    public void testHandle() throws SQLException {
+        ResultSetHandler<List<Object[]>> h = new ArrayListHandler();
+        List<Object[]> results = h.handle(this.rs);
+
+        assertNotNull(results);
+        assertEquals(ROWS, results.size());
+
+        Iterator<Object[]> iter = results.iterator();
+        Object[] row = null;
+        assertTrue(iter.hasNext());
+        row = iter.next();
+        assertEquals(COLS, row.length);
+        assertEquals("1", row[0]);
+        assertEquals("2", row[1]);
+        assertEquals("3", row[2]);
+
+        assertTrue(iter.hasNext());
+        row = iter.next();
+        assertEquals(COLS, row.length);
+
+        assertEquals("4", row[0]);
+        assertEquals("5", row[1]);
+        assertEquals("6", row[2]);
+
+        assertFalse(iter.hasNext());
+    }
+
+    public void testEmptyResultSetHandle() throws SQLException {
+        ResultSetHandler<List<Object[]>> h = new ArrayListHandler();
+        List<Object[]> results = h.handle(this.emptyResultSet);
+
+        assertNotNull(results);
+        assertTrue(results.isEmpty());
+    }
 
 }

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/BeanHandlerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/BeanHandlerTest.java?rev=1171779&r1=1171778&r2=1171779&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/BeanHandlerTest.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/BeanHandlerTest.java Fri Sep 16 21:01:30 2011
@@ -27,21 +27,21 @@ import org.apache.commons.dbutils.TestBe
  */
 public class BeanHandlerTest extends BaseTestCase {
 
-	public void testHandle() throws SQLException {
-		ResultSetHandler<TestBean> h = new BeanHandler<TestBean>(TestBean.class);
+    public void testHandle() throws SQLException {
+        ResultSetHandler<TestBean> h = new BeanHandler<TestBean>(TestBean.class);
         TestBean results = h.handle(this.rs);
-        
-		assertNotNull(results);
-		assertEquals("1", results.getOne());
-		assertEquals("2", results.getTwo());
-		assertEquals("3", results.getThree());
+
+        assertNotNull(results);
+        assertEquals("1", results.getOne());
+        assertEquals("2", results.getTwo());
+        assertEquals("3", results.getThree());
         assertEquals("not set", results.getDoNotSet());
-	}
-    
+    }
+
     public void testEmptyResultSetHandle() throws SQLException {
         ResultSetHandler<TestBean> h = new BeanHandler<TestBean>(TestBean.class);
         TestBean results = h.handle(this.emptyResultSet);
-        
+
         assertNull(results);
     }
 

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/BeanListHandlerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/BeanListHandlerTest.java?rev=1171779&r1=1171778&r2=1171779&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/BeanListHandlerTest.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/BeanListHandlerTest.java Fri Sep 16 21:01:30 2011
@@ -29,22 +29,22 @@ import org.apache.commons.dbutils.TestBe
  */
 public class BeanListHandlerTest extends BaseTestCase {
 
-	public void testHandle() throws SQLException {
-		ResultSetHandler<List<TestBean>> h = new BeanListHandler<TestBean>(TestBean.class);
-		List<TestBean> results = h.handle(this.rs);
+    public void testHandle() throws SQLException {
+        ResultSetHandler<List<TestBean>> h = new BeanListHandler<TestBean>(TestBean.class);
+        List<TestBean> results = h.handle(this.rs);
 
-		assertNotNull(results);
-		assertEquals(ROWS, results.size());
+        assertNotNull(results);
+        assertEquals(ROWS, results.size());
 
-		Iterator<TestBean> iter = results.iterator();
-		TestBean row = null;
+        Iterator<TestBean> iter = results.iterator();
+        TestBean row = null;
         assertTrue(iter.hasNext());
         row = iter.next();
         assertEquals("1", row.getOne());
         assertEquals("2", row.getTwo());
         assertEquals("3", row.getThree());
         assertEquals("not set", row.getDoNotSet());
-            
+
         assertTrue(iter.hasNext());
         row = iter.next();
 
@@ -52,16 +52,16 @@ public class BeanListHandlerTest extends
         assertEquals("5", row.getTwo());
         assertEquals("6", row.getThree());
         assertEquals("not set", row.getDoNotSet());
-        
+
         assertFalse(iter.hasNext());
-	}
+    }
 
-	public void testEmptyResultSetHandle() throws SQLException {
-		ResultSetHandler<List<TestBean>> h = new BeanListHandler<TestBean>(TestBean.class);
-		List<TestBean> results = h.handle(this.emptyResultSet);
-
-		assertNotNull(results);
-		assertTrue(results.isEmpty());
-	}
+    public void testEmptyResultSetHandle() throws SQLException {
+        ResultSetHandler<List<TestBean>> h = new BeanListHandler<TestBean>(TestBean.class);
+        List<TestBean> results = h.handle(this.emptyResultSet);
+
+        assertNotNull(results);
+        assertTrue(results.isEmpty());
+    }
 
 }

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/KeyedHandlerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/KeyedHandlerTest.java?rev=1171779&r1=1171778&r2=1171779&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/KeyedHandlerTest.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/KeyedHandlerTest.java Fri Sep 16 21:01:30 2011
@@ -36,9 +36,9 @@ public class KeyedHandlerTest extends Ba
         Map<String,Object> row = null;
         for(Entry<Object, Map<String, Object>> entry : results.entrySet())
         {
-        	Object key = entry.getKey();
-        	assertNotNull(key);
-        	row = entry.getValue();
+            Object key = entry.getKey();
+            assertNotNull(key);
+            row = entry.getValue();
             assertNotNull(row);
             assertEquals(COLS, row.keySet().size());
         }
@@ -58,9 +58,9 @@ public class KeyedHandlerTest extends Ba
         Map<String,Object> row = null;
         for(Entry<Object, Map<String, Object>> entry : results.entrySet())
         {
-        	Object key = entry.getKey();
-        	assertNotNull(key);
-        	row = entry.getValue();
+            Object key = entry.getKey();
+            assertNotNull(key);
+            row = entry.getValue();
             assertNotNull(row);
             assertEquals(COLS, row.keySet().size());
         }
@@ -80,11 +80,11 @@ public class KeyedHandlerTest extends Ba
         Map<String,Object> row = null;
         for(Entry<Object, Map<String, Object>> entry : results.entrySet())
         {
-        	Object key = entry.getKey();
-        	assertNotNull(key);
-        	row = entry.getValue();
-        	assertNotNull(row);
-        	assertEquals(COLS, row.keySet().size());
+            Object key = entry.getKey();
+            assertNotNull(key);
+            row = entry.getValue();
+            assertNotNull(row);
+            assertEquals(COLS, row.keySet().size());
         }
         row = results.get("6");
         assertEquals("4", row.get("one"));

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/MapHandlerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/MapHandlerTest.java?rev=1171779&r1=1171778&r2=1171779&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/MapHandlerTest.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/handlers/MapHandlerTest.java Fri Sep 16 21:01:30 2011
@@ -27,21 +27,21 @@ import org.apache.commons.dbutils.Result
  */
 public class MapHandlerTest extends BaseTestCase {
 
-	public void testHandle() throws SQLException {
-		ResultSetHandler<Map<String,Object>> h = new MapHandler();
+    public void testHandle() throws SQLException {
+        ResultSetHandler<Map<String,Object>> h = new MapHandler();
         Map<String,Object> results = h.handle(this.rs);
-        
-		assertNotNull(results);
-		assertEquals(COLS, results.keySet().size());
-		assertEquals("1", results.get("ONE"));
-		assertEquals("2", results.get("two"));
-		assertEquals("3", results.get("Three"));
-	}
-    
+
+        assertNotNull(results);
+        assertEquals(COLS, results.keySet().size());
+        assertEquals("1", results.get("ONE"));
+        assertEquals("2", results.get("two"));
+        assertEquals("3", results.get("Three"));
+    }
+
     public void testEmptyResultSetHandle() throws SQLException {
         ResultSetHandler<Map<String,Object>> h = new MapHandler();
         Map<String,Object> results = h.handle(this.emptyResultSet);
-        
+
         assertNull(results);
     }
 



Mime
View raw message