commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1753635 - /commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestDelegatingConnection.java
Date Thu, 21 Jul 2016 03:49:33 GMT
Author: ggregory
Date: Thu Jul 21 03:49:33 2016
New Revision: 1753635

URL: http://svn.apache.org/viewvc?rev=1753635&view=rev
Log:
Test plain use case of org.apache.commons.dbcp2.DelegatingConnection.isClosed().

Modified:
    commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestDelegatingConnection.java

Modified: commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestDelegatingConnection.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestDelegatingConnection.java?rev=1753635&r1=1753634&r2=1753635&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestDelegatingConnection.java
(original)
+++ commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestDelegatingConnection.java
Thu Jul 21 03:49:33 2016
@@ -19,6 +19,7 @@ package org.apache.commons.dbcp2;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -129,4 +130,13 @@ public class TestDelegatingConnection {
         }
 
     }
+
+    @Test
+    public void testIsClosed() throws Exception {
+        conn.checkOpen();
+        assertFalse(conn.isClosed());
+        conn.close();
+        assertTrue(conn.isClosed());
+    }
+
 }



Mime
View raw message