Skip to content

Commit

Permalink
Make test more readable and maintainable, and less verbose
Browse files Browse the repository at this point in the history
- Use JUnit 5 APIs
- Be consistent throughout tests
  • Loading branch information
garydgregory committed Oct 1, 2024
1 parent c3b965b commit a76ddac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
6 changes: 0 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -34,7 +30,7 @@ public void testEmptyResultSetHandle() throws SQLException {
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 {
Expand Down

0 comments on commit a76ddac

Please sign in to comment.