This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbutils.git


The following commit(s) were added to refs/heads/master by this push:
     new a76ddac  Make test more readable and maintainable, and less verbose
a76ddac is described below

commit a76ddac489f9e4e83502b32c54ffc69d208ca2c8
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Oct 1 09:03:33 2024 -0400

    Make test more readable and maintainable, and less verbose
    
    - Use JUnit 5 APIs
    - Be consistent throughout tests
---
 pom.xml                                                             | 6 ------
 .../java/org/apache/commons/dbutils/handlers/ArrayHandlerTest.java  | 6 +-----
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/pom.xml b/pom.xml
index 0b304c7..e0e2256 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,12 +54,6 @@
       <version>5.14.1</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest</artifactId>
-      <version>3.0</version>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
 
   <distributionManagement>
diff --git 
a/src/test/java/org/apache/commons/dbutils/handlers/ArrayHandlerTest.java 
b/src/test/java/org/apache/commons/dbutils/handlers/ArrayHandlerTest.java
index 2a33992..0995cf7 100644
--- a/src/test/java/org/apache/commons/dbutils/handlers/ArrayHandlerTest.java
+++ b/src/test/java/org/apache/commons/dbutils/handlers/ArrayHandlerTest.java
@@ -16,10 +16,6 @@
  */
 package org.apache.commons.dbutils.handlers;
 
-import static org.hamcrest.Matchers.emptyArray;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-
 import java.sql.SQLException;
 
 import org.apache.commons.dbutils.BaseTestCase;
@@ -34,7 +30,7 @@ public class ArrayHandlerTest extends BaseTestCase {
         final ResultSetHandler<Object[]> h = new ArrayHandler();
         final Object[] results = h.handle(getEmptyResultSet());
 
-        assertThat(results, is(emptyArray()));
+        assertEquals(0, results.length);
     }
 
     public void testHandle() throws SQLException {

Reply via email to