clean up some of the statement lambdas

This commit is contained in:
Justin Lu 2026-01-27 09:33:15 -08:00
parent 70254c6c28
commit 06098254bf
3 changed files with 70 additions and 204 deletions

View File

@ -544,9 +544,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0004(RowSet rs) throws Exception { public void commonRowSetTest0004(RowSet rs) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rs.setConcurrency(ResultSet.CLOSE_CURSORS_AT_COMMIT));
rs.setConcurrency(ResultSet.CLOSE_CURSORS_AT_COMMIT);
});
} }
/* /*
@ -630,9 +628,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0013(RowSet rs) throws Exception { public void commonRowSetTest0013(RowSet rs) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rs.setFetchSize(-1));
rs.setFetchSize(-1);
});
} }
/* /*
@ -671,9 +667,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0016(RowSet rs) throws Exception { public void commonRowSetTest0016(RowSet rs) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rs.setMaxFieldSize(-1));
rs.setMaxFieldSize(-1);
});
} }
/* /*
@ -800,9 +794,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0027(RowSet rs) throws Exception { public void commonRowSetTest0027(RowSet rs) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rs.setQueryTimeout(-1));
rs.setQueryTimeout(-1);
});
} }
@ -935,9 +927,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0106(RowSet rs) throws Exception { public void commonRowSetTest0106(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setBigDecimal("one", BigDecimal.ONE));
rs.setBigDecimal("one", BigDecimal.ONE);
});
} }
/* /*
@ -986,9 +976,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0110(RowSet rs) throws Exception { public void commonRowSetTest0110(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setBlob("one", new StubBlob()));
rs.setBlob("one", new StubBlob());
});
} }
/* /*
@ -998,9 +986,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0111(RowSet rs) throws Exception { public void commonRowSetTest0111(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setBoolean("one", true));
rs.setBoolean("one", true);
});
} }
/* /*
@ -1114,9 +1100,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0120(RowSet rs) throws Exception { public void commonRowSetTest0120(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setClob("one", new StubClob()));
rs.setClob("one", new StubClob());
});
} }
/* /*
@ -1126,9 +1110,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0121(RowSet rs) throws Exception { public void commonRowSetTest0121(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setDate("one", Date.valueOf(LocalDate.now())));
rs.setDate("one", Date.valueOf(LocalDate.now()));
});
} }
/* /*
@ -1138,10 +1120,8 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0122(RowSet rs) throws Exception { public void commonRowSetTest0122(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setDate("one", Date.valueOf(LocalDate.now()),
rs.setDate("one", Date.valueOf(LocalDate.now()), Calendar.getInstance()));
Calendar.getInstance());
});
} }
/* /*
@ -1151,9 +1131,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0123(RowSet rs) throws Exception { public void commonRowSetTest0123(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setTime("one", Time.valueOf(LocalTime.now())));
rs.setTime("one", Time.valueOf(LocalTime.now()));
});
} }
/* /*
@ -1163,10 +1141,8 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0124(RowSet rs) throws Exception { public void commonRowSetTest0124(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setTime("one", Time.valueOf(LocalTime.now()),
rs.setTime("one", Time.valueOf(LocalTime.now()), Calendar.getInstance()));
Calendar.getInstance());
});
} }
/* /*
@ -1176,9 +1152,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0125(RowSet rs) throws Exception { public void commonRowSetTest0125(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setTimestamp("one", Timestamp.valueOf(LocalDateTime.now())));
rs.setTimestamp("one", Timestamp.valueOf(LocalDateTime.now()));
});
} }
/* /*
@ -1188,10 +1162,8 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0126(RowSet rs) throws Exception { public void commonRowSetTest0126(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setTimestamp("one", Timestamp.valueOf(LocalDateTime.now()),
rs.setTimestamp("one", Timestamp.valueOf(LocalDateTime.now()), Calendar.getInstance()));
Calendar.getInstance());
});
} }
/* /*
@ -1201,9 +1173,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0127(RowSet rs) throws Exception { public void commonRowSetTest0127(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setDouble("one", 2.0d));
rs.setDouble("one", 2.0d);
});
} }
/* /*
@ -1213,9 +1183,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0128(RowSet rs) throws Exception { public void commonRowSetTest0128(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setFloat("one", 2.0f));
rs.setFloat("one", 2.0f);
});
} }
/* /*
@ -1225,9 +1193,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0129(RowSet rs) throws Exception { public void commonRowSetTest0129(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setInt("one", 21));
rs.setInt("one", 21);
});
} }
/* /*
@ -1237,9 +1203,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0130(RowSet rs) throws Exception { public void commonRowSetTest0130(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setLong("one", 21l));
rs.setLong("one", 21l);
});
} }
/* /*
@ -1327,9 +1291,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0137(RowSet rs) throws Exception { public void commonRowSetTest0137(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setNClob("one", new StubNClob()));
rs.setNClob("one", new StubNClob());
});
} }
/* /*
@ -1365,9 +1327,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0140(RowSet rs) throws Exception { public void commonRowSetTest0140(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setNClob(1, new StubNClob()));
rs.setNClob(1, new StubNClob());
});
} }
/* /*
@ -1377,9 +1337,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0141(RowSet rs) throws Exception { public void commonRowSetTest0141(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setNString(1, query));
rs.setNString(1, query);
});
} }
/* /*
@ -1389,9 +1347,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0142(RowSet rs) throws Exception { public void commonRowSetTest0142(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setNull("one", Types.INTEGER));
rs.setNull("one", Types.INTEGER);
});
} }
/* /*
@ -1401,9 +1357,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0143(RowSet rs) throws Exception { public void commonRowSetTest0143(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setNull("one", Types.INTEGER, "my.type"));
rs.setNull("one", Types.INTEGER, "my.type");
});
} }
/* /*
@ -1413,9 +1367,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0144(RowSet rs) throws Exception { public void commonRowSetTest0144(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setObject("one", query, Types.VARCHAR));
rs.setObject("one", query, Types.VARCHAR);
});
} }
/* /*
@ -1425,9 +1377,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0145(RowSet rs) throws Exception { public void commonRowSetTest0145(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setObject("one", query, Types.VARCHAR, 0));
rs.setObject("one", query, Types.VARCHAR, 0);
});
} }
/* /*
@ -1437,9 +1387,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0146(RowSet rs) throws Exception { public void commonRowSetTest0146(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setObject("one", query));
rs.setObject("one", query);
});
} }
/* /*
@ -1462,9 +1410,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0148(RowSet rs) throws Exception { public void commonRowSetTest0148(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setSQLXML("one", new StubSQLXML()));
rs.setSQLXML("one", new StubSQLXML());
});
} }
/* /*
@ -1474,9 +1420,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0149(RowSet rs) throws Exception { public void commonRowSetTest0149(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setSQLXML(1, new StubSQLXML()));
rs.setSQLXML(1, new StubSQLXML());
});
} }
/* /*
@ -1486,9 +1430,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0150(RowSet rs) throws Exception { public void commonRowSetTest0150(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setNString(1, query));
rs.setNString(1, query);
});
} }
/* /*
@ -1498,9 +1440,7 @@ public abstract class CommonRowSetTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("rowSetType") @MethodSource("rowSetType")
public void commonRowSetTest0151(RowSet rs) throws Exception { public void commonRowSetTest0151(RowSet rs) throws Exception {
assertThrows(SQLFeatureNotSupportedException.class, () -> { assertThrows(SQLFeatureNotSupportedException.class, () -> rs.setNString("one", query));
rs.setNString("one", query);
});
} }
/* /*

View File

@ -59,9 +59,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test(Integer col) throws Exception { public void test(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.getCatalogName(col));
rsmd.getCatalogName(col);
});
} }
/* /*
@ -70,9 +68,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test01(Integer col) throws Exception { public void test01(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.getColumnClassName(col));
rsmd.getColumnClassName(col);
});
} }
/* /*
@ -81,9 +77,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test02(Integer col) throws Exception { public void test02(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.getColumnDisplaySize(col));
rsmd.getColumnDisplaySize(col);
});
} }
/* /*
@ -92,9 +86,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test03(Integer col) throws Exception { public void test03(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.getColumnLabel(col));
rsmd.getColumnLabel(col);
});
} }
/* /*
@ -103,9 +95,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test04(Integer col) throws Exception { public void test04(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.getColumnName(col));
rsmd.getColumnName(col);
});
} }
/* /*
@ -114,9 +104,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test05(Integer col) throws Exception { public void test05(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.getColumnType(col));
rsmd.getColumnType(col);
});
} }
/* /*
@ -125,9 +113,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test06(Integer col) throws Exception { public void test06(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.getColumnTypeName(col));
rsmd.getColumnTypeName(col);
});
} }
/* /*
@ -136,9 +122,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test07(Integer col) throws Exception { public void test07(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.getPrecision(col));
rsmd.getPrecision(col);
});
} }
/* /*
@ -147,9 +131,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test08(Integer col) throws Exception { public void test08(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.getScale(col));
rsmd.getScale(col);
});
} }
/* /*
@ -158,9 +140,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test09(Integer col) throws Exception { public void test09(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.getSchemaName(col));
rsmd.getSchemaName(col);
});
} }
/* /*
@ -169,9 +149,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test10(Integer col) throws Exception { public void test10(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.getTableName(col));
rsmd.getTableName(col);
});
} }
/* /*
@ -180,9 +158,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test11(Integer col) throws Exception { public void test11(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.isAutoIncrement(col));
rsmd.isAutoIncrement(col);
});
} }
/* /*
@ -191,9 +167,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test12(Integer col) throws Exception { public void test12(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.isCaseSensitive(col));
rsmd.isCaseSensitive(col);
});
} }
/* /*
@ -202,9 +176,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test13(Integer col) throws Exception { public void test13(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.isCurrency(col));
rsmd.isCurrency(col);
});
} }
/* /*
@ -213,9 +185,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test14(Integer col) throws Exception { public void test14(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.isDefinitelyWritable(col));
rsmd.isDefinitelyWritable(col);
});
} }
/* /*
@ -224,9 +194,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test15(Integer col) throws Exception { public void test15(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.isNullable(col));
rsmd.isNullable(col);
});
} }
/* /*
@ -235,9 +203,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test16(Integer col) throws Exception { public void test16(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.isReadOnly(col));
rsmd.isReadOnly(col);
});
} }
/* /*
@ -246,9 +212,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test17(Integer col) throws Exception { public void test17(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.isSearchable(col));
rsmd.isSearchable(col);
});
} }
/* /*
@ -257,9 +221,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test18(Integer col) throws Exception { public void test18(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.isSigned(col));
rsmd.isSigned(col);
});
} }
/* /*
@ -268,9 +230,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test19(Integer col) throws Exception { public void test19(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.isWritable(col));
rsmd.isWritable(col);
});
} }
/* /*
@ -279,9 +239,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test20(Integer col) throws Exception { public void test20(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setAutoIncrement(col, true));
rsmd.setAutoIncrement(col, true);
});
} }
/* /*
@ -290,9 +248,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test21(Integer col) throws Exception { public void test21(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setCaseSensitive(col, true));
rsmd.setCaseSensitive(col, true);
});
} }
/* /*
@ -301,9 +257,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test22(Integer col) throws Exception { public void test22(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setCatalogName(col, null));
rsmd.setCatalogName(col, null);
});
} }
/* /*
@ -312,9 +266,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test23(Integer col) throws Exception { public void test23(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setColumnDisplaySize(col, 5));
rsmd.setColumnDisplaySize(col, 5);
});
} }
/* /*
@ -323,9 +275,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test24(Integer col) throws Exception { public void test24(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setColumnLabel(col, "label"));
rsmd.setColumnLabel(col, "label");
});
} }
/* /*
@ -334,9 +284,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test25(Integer col) throws Exception { public void test25(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setColumnName(col, "F1"));
rsmd.setColumnName(col, "F1");
});
} }
/* /*
@ -345,9 +293,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test26(Integer col) throws Exception { public void test26(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setColumnType(col, Types.CHAR));
rsmd.setColumnType(col, Types.CHAR);
});
} }
/* /*
@ -356,9 +302,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test27(Integer col) throws Exception { public void test27(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setColumnTypeName(col, "F1"));
rsmd.setColumnTypeName(col, "F1");
});
} }
/* /*
@ -367,9 +311,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test28(Integer col) throws Exception { public void test28(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setCurrency(col, true));
rsmd.setCurrency(col, true);
});
} }
/* /*
@ -378,9 +320,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test29(Integer col) throws Exception { public void test29(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setNullable(col, ResultSetMetaData.columnNoNulls));
rsmd.setNullable(col, ResultSetMetaData.columnNoNulls);
});
} }
/* /*
@ -389,9 +329,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test30(Integer col) throws Exception { public void test30(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setPrecision(col, 2));
rsmd.setPrecision(col, 2);
});
} }
/* /*
@ -400,9 +338,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test31(Integer col) throws Exception { public void test31(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setScale(col, 2));
rsmd.setScale(col, 2);
});
} }
/* /*
@ -411,9 +347,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test32(Integer col) throws Exception { public void test32(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setSchemaName(col, "Gotham"));
rsmd.setSchemaName(col, "Gotham");
});
} }
/* /*
@ -422,9 +356,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test33(Integer col) throws Exception { public void test33(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setSearchable(col, false));
rsmd.setSearchable(col, false);
});
} }
/* /*
@ -433,9 +365,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test34(Integer col) throws Exception { public void test34(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setSigned(col, false));
rsmd.setSigned(col, false);
});
} }
/* /*
@ -444,9 +374,7 @@ public class RowSetMetaDataTests extends BaseTest {
@ParameterizedTest(autoCloseArguments = false) @ParameterizedTest(autoCloseArguments = false)
@MethodSource("invalidColumnRanges") @MethodSource("invalidColumnRanges")
public void test35(Integer col) throws Exception { public void test35(Integer col) throws Exception {
assertThrows(SQLException.class, () -> { assertThrows(SQLException.class, () -> rsmd.setTableName(col, "SUPERHEROS"));
rsmd.setTableName(col, "SUPERHEROS");
});
} }
/* /*

View File

@ -187,9 +187,7 @@ public class SyncFactoryTests {
*/ */
@Test @Test
public void test08() throws Exception { public void test08() throws Exception {
assertThrows(SyncFactoryException.class, () -> { assertThrows(SyncFactoryException.class, () -> SyncFactory.setJNDIContext(null));
SyncFactory.setJNDIContext(null);
});
} }
/* /*