commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1483134 - /commons/proper/dbutils/branches/2_0/src/test/java/org/apache/commons/dbutils2/DbUtilsTest.java
Date Thu, 16 May 2013 00:50:05 GMT
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
 }



Mime
View raw message