You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2013/05/16 02:50:05 UTC

svn commit: r1483134 - /commons/proper/dbutils/branches/2_0/src/test/java/org/apache/commons/dbutils2/DbUtilsTest.java

Author: sebb
Date: Thu May 16 00:50:05 2013
New Revision: 1483134

URL: http://svn.apache.org/r1483134
Log:
Update tests

Modified:
    commons/proper/dbutils/branches/2_0/src/test/java/org/apache/commons/dbutils2/DbUtilsTest.java

Modified: commons/proper/dbutils/branches/2_0/src/test/java/org/apache/commons/dbutils2/DbUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/branches/2_0/src/test/java/org/apache/commons/dbutils2/DbUtilsTest.java?rev=1483134&r1=1483133&r2=1483134&view=diff
==============================================================================
--- commons/proper/dbutils/branches/2_0/src/test/java/org/apache/commons/dbutils2/DbUtilsTest.java (original)
+++ commons/proper/dbutils/branches/2_0/src/test/java/org/apache/commons/dbutils2/DbUtilsTest.java Thu May 16 00:50:05 2013
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.dbutils2;
 
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
@@ -270,4 +271,15 @@ public class DbUtilsTest {
         verify(mockConnection).close();
     }
 
+    @Test(expected=NullPointerException.class)
+    public void loadDriverNull() throws Exception {
+        DbUtils.loadDriver(null);
+    }
+
+    @Test
+    public void loadDriver() throws Exception {
+        assertFalse(DbUtils.loadDriver(""));
+    }
+
+    //TODO need test for getParentLogger
 }