Skip to content

Commit

Permalink
Add test for number of loaded database drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
sualeh committed Sep 8, 2024
1 parent 2e871f3 commit 9269d29
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public String get() {
case CHILD:
return renderTableRelationships(TableReferenceType.CHILD);
case ALL:
// Fall-through
// Fall-through
default:
return renderTableRelationships(TableReferenceType.PARENT)
+ NEW_LINE
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package schemacrawler.integration.test;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import java.sql.Driver;
import java.util.Collection;
import org.junit.jupiter.api.Test;
import us.fatehi.utility.database.DatabaseUtility;

public class DatabaseDriverTest {

@Test
public void availableJDBCDrivers() throws Exception {
final Collection<Driver> availableJDBCDrivers = DatabaseUtility.getAvailableJdbcDrivers();
final int numJDBCDrivers = availableJDBCDrivers.size();
assertThat(
"Number of of avilable JDBC drivers is not correct - found " + numJDBCDrivers,
numJDBCDrivers == 20,
is(true));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public Object invoke(final Object proxy, final Method method, final Object[] arg
final OfflineConnection otherOfflineConnection = (OfflineConnection) args[0];
return otherOfflineConnection.hashCode() == offlineDatabasePath.hashCode();
}
// Fall through
// Fall through
default:
throw new SQLFeatureNotSupportedException(
String.format(
Expand Down

0 comments on commit 9269d29

Please sign in to comment.