You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by th...@apache.org on 2017/07/07 02:07:19 UTC
[57/58] [abbrv] commons-dbutils git commit: Update tests
Update tests
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/dbutils/branches/2_0@1483134 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/commons-dbutils/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-dbutils/commit/44eafd62
Tree: http://git-wip-us.apache.org/repos/asf/commons-dbutils/tree/44eafd62
Diff: http://git-wip-us.apache.org/repos/asf/commons-dbutils/diff/44eafd62
Branch: refs/heads/2_0
Commit: 44eafd62ee55bdc0fcb64a8b72dba9ba669a6719
Parents: 4aca205
Author: Sebastian Bazley <se...@apache.org>
Authored: Thu May 16 00:50:05 2013 +0000
Committer: Sebastian Bazley <se...@apache.org>
Committed: Thu May 16 00:50:05 2013 +0000
----------------------------------------------------------------------
.../java/org/apache/commons/dbutils2/DbUtilsTest.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-dbutils/blob/44eafd62/src/test/java/org/apache/commons/dbutils2/DbUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/dbutils2/DbUtilsTest.java b/src/test/java/org/apache/commons/dbutils2/DbUtilsTest.java
index 3623689..7c00f90 100644
--- a/src/test/java/org/apache/commons/dbutils2/DbUtilsTest.java
+++ b/src/test/java/org/apache/commons/dbutils2/DbUtilsTest.java
@@ -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
}