diff --git a/test/jdk/java/sql/junit/test/sql/CallableStatementTests.java b/test/jdk/java/sql/junit/test/sql/CallableStatementTests.java index 76f5732f21d..cc8a7c3c855 100644 --- a/test/jdk/java/sql/junit/test/sql/CallableStatementTests.java +++ b/test/jdk/java/sql/junit/test/sql/CallableStatementTests.java @@ -30,8 +30,9 @@ import java.sql.CallableStatement; import java.sql.SQLException; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -66,7 +67,7 @@ public class CallableStatementTests extends BaseTest { */ @Test public void test01() throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> cstmt.enquoteLiteral(null)); + assertThrows(NullPointerException.class, () -> cstmt.enquoteLiteral(null)); } /* @@ -85,7 +86,7 @@ public class CallableStatementTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidEnquotedIdentifierValues") public void test03(String s, boolean alwaysQuote) throws SQLException { - Assertions.assertThrows(SQLException.class, () -> cstmt.enquoteIdentifier(s, alwaysQuote)); + assertThrows(SQLException.class, () -> cstmt.enquoteIdentifier(s, alwaysQuote)); } /* @@ -95,7 +96,7 @@ public class CallableStatementTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @ValueSource(booleans = {true, false}) public void test04(boolean alwaysQuote) throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> cstmt.enquoteIdentifier(null, alwaysQuote)); + assertThrows(NullPointerException.class, () -> cstmt.enquoteIdentifier(null, alwaysQuote)); } /* @@ -113,7 +114,7 @@ public class CallableStatementTests extends BaseTest { */ @Test public void test06() throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> cstmt.isSimpleIdentifier(null)); + assertThrows(NullPointerException.class, () -> cstmt.isSimpleIdentifier(null)); } /* @@ -132,6 +133,6 @@ public class CallableStatementTests extends BaseTest { */ @Test public void test08() throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> cstmt.enquoteNCharLiteral(null)); + assertThrows(NullPointerException.class, () -> cstmt.enquoteNCharLiteral(null)); } } diff --git a/test/jdk/java/sql/junit/test/sql/ConnectionTests.java b/test/jdk/java/sql/junit/test/sql/ConnectionTests.java index 264f7273f29..d1b0a26ba81 100644 --- a/test/jdk/java/sql/junit/test/sql/ConnectionTests.java +++ b/test/jdk/java/sql/junit/test/sql/ConnectionTests.java @@ -28,7 +28,6 @@ import util.StubConnection; import java.sql.SQLException; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -60,7 +59,7 @@ public class ConnectionTests extends BaseTest { */ @Test public void test01() throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> conn.enquoteLiteral(null)); + assertThrows(NullPointerException.class, () -> conn.enquoteLiteral(null)); } /* @@ -79,7 +78,7 @@ public class ConnectionTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidEnquotedIdentifierValues") public void test03(String s, boolean alwaysQuote) throws SQLException { - Assertions.assertThrows(SQLException.class, () -> conn.enquoteIdentifier(s, alwaysQuote)); + assertThrows(SQLException.class, () -> conn.enquoteIdentifier(s, alwaysQuote)); } /* @@ -89,7 +88,7 @@ public class ConnectionTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @ValueSource(booleans = {true, false}) public void test04(boolean alwaysQuote) throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> conn.enquoteIdentifier(null, alwaysQuote)); + assertThrows(NullPointerException.class, () -> conn.enquoteIdentifier(null, alwaysQuote)); } /* @@ -107,7 +106,7 @@ public class ConnectionTests extends BaseTest { */ @Test public void test06() throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> conn.isSimpleIdentifier(null)); + assertThrows(NullPointerException.class, () -> conn.isSimpleIdentifier(null)); } /* @@ -126,6 +125,6 @@ public class ConnectionTests extends BaseTest { */ @Test public void test08() throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> conn.enquoteNCharLiteral(null)); + assertThrows(NullPointerException.class, () -> conn.enquoteNCharLiteral(null)); } } diff --git a/test/jdk/java/sql/junit/test/sql/DateTests.java b/test/jdk/java/sql/junit/test/sql/DateTests.java index 0aa96201b5a..65cc43e4cea 100644 --- a/test/jdk/java/sql/junit/test/sql/DateTests.java +++ b/test/jdk/java/sql/junit/test/sql/DateTests.java @@ -26,7 +26,6 @@ import java.sql.Date; import java.time.LocalDate; import java.util.stream.Stream; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -43,7 +42,7 @@ public class DateTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidDateValues") public void test(String d) throws Exception { - Assertions.assertThrows(IllegalArgumentException.class, () -> Date.valueOf(d)); + assertThrows(IllegalArgumentException.class, () -> Date.valueOf(d)); } /* @@ -216,7 +215,7 @@ public class DateTests extends BaseTest { @Test public void test15() throws Exception { LocalDate ld = null; - Assertions.assertThrows(NullPointerException.class, () -> Date.valueOf(ld)); + assertThrows(NullPointerException.class, () -> Date.valueOf(ld)); } /* @@ -226,7 +225,7 @@ public class DateTests extends BaseTest { @Test public void test16() throws Exception { Date d = Date.valueOf("1961-08-30"); - Assertions.assertThrows(UnsupportedOperationException.class, d::toInstant); + assertThrows(UnsupportedOperationException.class, d::toInstant); } /* @@ -280,7 +279,7 @@ public class DateTests extends BaseTest { @Test public void test21() throws Exception { Date d = Date.valueOf("1961-08-30"); - Assertions.assertThrows(IllegalArgumentException.class, d::getHours); + assertThrows(IllegalArgumentException.class, d::getHours); } /* @@ -289,7 +288,7 @@ public class DateTests extends BaseTest { @Test public void test22() throws Exception { Date d = Date.valueOf("1961-08-30"); - Assertions.assertThrows(IllegalArgumentException.class, d::getMinutes); + assertThrows(IllegalArgumentException.class, d::getMinutes); } /* @@ -298,7 +297,7 @@ public class DateTests extends BaseTest { @Test public void test23() throws Exception { Date d = Date.valueOf("1961-08-30"); - Assertions.assertThrows(IllegalArgumentException.class, d::getSeconds); + assertThrows(IllegalArgumentException.class, d::getSeconds); } /* @@ -307,7 +306,7 @@ public class DateTests extends BaseTest { @Test public void test24() throws Exception { Date d = Date.valueOf("1961-08-30"); - Assertions.assertThrows(IllegalArgumentException.class, () -> d.setHours(8)); + assertThrows(IllegalArgumentException.class, () -> d.setHours(8)); } /* @@ -316,7 +315,7 @@ public class DateTests extends BaseTest { @Test public void test25() throws Exception { Date d = Date.valueOf("1961-08-30"); - Assertions.assertThrows(IllegalArgumentException.class, () -> d.setMinutes(0)); + assertThrows(IllegalArgumentException.class, () -> d.setMinutes(0)); } /* @@ -325,7 +324,7 @@ public class DateTests extends BaseTest { @Test public void test26() throws Exception { Date d = Date.valueOf("1961-08-30"); - Assertions.assertThrows(IllegalArgumentException.class, () -> d.setSeconds(0)); + assertThrows(IllegalArgumentException.class, () -> d.setSeconds(0)); } /* diff --git a/test/jdk/java/sql/junit/test/sql/DriverManagerTests.java b/test/jdk/java/sql/junit/test/sql/DriverManagerTests.java index 1de4699eaff..9708b0ea478 100644 --- a/test/jdk/java/sql/junit/test/sql/DriverManagerTests.java +++ b/test/jdk/java/sql/junit/test/sql/DriverManagerTests.java @@ -39,7 +39,6 @@ import java.util.Collections; import java.util.Properties; import java.util.stream.Collectors; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -111,7 +110,7 @@ public class DriverManagerTests { @Test public void test1() throws Exception { Driver d = null; - Assertions.assertThrows(NullPointerException.class, + assertThrows(NullPointerException.class, () -> DriverManager.registerDriver(d)); } @@ -122,7 +121,7 @@ public class DriverManagerTests { @Test public void test2() throws Exception { Driver d = null; - Assertions.assertThrows(NullPointerException.class, () -> + assertThrows(NullPointerException.class, () -> DriverManager.registerDriver(d, null)); } @@ -141,7 +140,7 @@ public class DriverManagerTests { */ @Test public void test4() throws Exception { - Assertions.assertThrows(SQLException.class, () -> DriverManager.getConnection(InvalidURL)); + assertThrows(SQLException.class, () -> DriverManager.getConnection(InvalidURL)); } /** @@ -150,7 +149,7 @@ public class DriverManagerTests { */ @Test public void test5() throws Exception { - Assertions.assertThrows(SQLException.class, () -> DriverManager.getConnection(InvalidURL, new Properties())); + assertThrows(SQLException.class, () -> DriverManager.getConnection(InvalidURL, new Properties())); } /** @@ -159,7 +158,7 @@ public class DriverManagerTests { */ @Test public void test6() throws Exception { - Assertions.assertThrows(SQLException.class, () -> DriverManager.getConnection(InvalidURL, "LuckyDog", "tennisanyone")); + assertThrows(SQLException.class, () -> DriverManager.getConnection(InvalidURL, "LuckyDog", "tennisanyone")); } /** @@ -167,7 +166,7 @@ public class DriverManagerTests { */ @Test public void test7() throws Exception { - Assertions.assertThrows(SQLException.class, () -> DriverManager.getConnection(null)); + assertThrows(SQLException.class, () -> DriverManager.getConnection(null)); } /** @@ -175,7 +174,7 @@ public class DriverManagerTests { */ @Test public void test8() throws Exception { - Assertions.assertThrows(SQLException.class, () -> DriverManager.getConnection(null, new Properties())); + assertThrows(SQLException.class, () -> DriverManager.getConnection(null, new Properties())); } /** @@ -183,7 +182,7 @@ public class DriverManagerTests { */ @Test public void test9() throws Exception { - Assertions.assertThrows(SQLException.class, () -> DriverManager.getConnection(null, "LuckyDog", "tennisanyone")); + assertThrows(SQLException.class, () -> DriverManager.getConnection(null, "LuckyDog", "tennisanyone")); } /** @@ -192,7 +191,7 @@ public class DriverManagerTests { */ @Test public void test10() throws Exception { - Assertions.assertThrows(SQLException.class, () -> DriverManager.getDriver(InvalidURL)); + assertThrows(SQLException.class, () -> DriverManager.getDriver(InvalidURL)); } /** @@ -200,7 +199,7 @@ public class DriverManagerTests { */ @Test public void test11() throws Exception { - Assertions.assertThrows(SQLException.class, () -> DriverManager.getDriver(null)); + assertThrows(SQLException.class, () -> DriverManager.getDriver(null)); } /** @@ -221,7 +220,7 @@ public class DriverManagerTests { @Test public void test13() throws Exception { DriverManager.registerDriver(new StubDriver()); - Assertions.assertThrows(SQLException.class, () -> DriverManager.getDriver(InvalidURL)); + assertThrows(SQLException.class, () -> DriverManager.getDriver(InvalidURL)); } /** diff --git a/test/jdk/java/sql/junit/test/sql/PreparedStatementTests.java b/test/jdk/java/sql/junit/test/sql/PreparedStatementTests.java index 4eb1520e431..1c843df4fde 100644 --- a/test/jdk/java/sql/junit/test/sql/PreparedStatementTests.java +++ b/test/jdk/java/sql/junit/test/sql/PreparedStatementTests.java @@ -30,8 +30,9 @@ import java.sql.PreparedStatement; import java.sql.SQLException; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -67,7 +68,7 @@ public class PreparedStatementTests extends BaseTest { */ @Test public void test01() throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> pstmt.enquoteLiteral(null)); + assertThrows(NullPointerException.class, () -> pstmt.enquoteLiteral(null)); } /* @@ -86,7 +87,7 @@ public class PreparedStatementTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidEnquotedIdentifierValues") public void test03(String s, boolean alwaysQuote) throws SQLException { - Assertions.assertThrows(SQLException.class, () -> pstmt.enquoteIdentifier(s, alwaysQuote)); + assertThrows(SQLException.class, () -> pstmt.enquoteIdentifier(s, alwaysQuote)); } /* @@ -96,7 +97,7 @@ public class PreparedStatementTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @ValueSource(booleans = {true, false}) public void test04(boolean alwaysQuote) throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> pstmt.enquoteIdentifier(null, alwaysQuote)); + assertThrows(NullPointerException.class, () -> pstmt.enquoteIdentifier(null, alwaysQuote)); } /* @@ -114,7 +115,7 @@ public class PreparedStatementTests extends BaseTest { */ @Test public void test06() throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> pstmt.isSimpleIdentifier(null)); + assertThrows(NullPointerException.class, () -> pstmt.isSimpleIdentifier(null)); } /* @@ -133,6 +134,6 @@ public class PreparedStatementTests extends BaseTest { */ @Test public void test08() throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> pstmt.enquoteNCharLiteral(null)); + assertThrows(NullPointerException.class, () -> pstmt.enquoteNCharLiteral(null)); } } diff --git a/test/jdk/java/sql/junit/test/sql/StatementTests.java b/test/jdk/java/sql/junit/test/sql/StatementTests.java index d4de523bb16..ce50c985505 100644 --- a/test/jdk/java/sql/junit/test/sql/StatementTests.java +++ b/test/jdk/java/sql/junit/test/sql/StatementTests.java @@ -26,8 +26,9 @@ import java.sql.SQLException; import java.sql.Statement; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -66,7 +67,7 @@ public class StatementTests extends BaseTest { */ @Test public void test01() throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> stmt.enquoteLiteral(null)); + assertThrows(NullPointerException.class, () -> stmt.enquoteLiteral(null)); } /* @@ -85,7 +86,7 @@ public class StatementTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidEnquotedIdentifierValues") public void test03(String s, boolean alwaysQuote) throws SQLException { - Assertions.assertThrows(SQLException.class, () -> stmt.enquoteIdentifier(s, alwaysQuote)); + assertThrows(SQLException.class, () -> stmt.enquoteIdentifier(s, alwaysQuote)); } /* @@ -95,7 +96,7 @@ public class StatementTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @ValueSource(booleans = {true, false}) public void test04(boolean alwaysQuote) throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> stmt.enquoteIdentifier(null, alwaysQuote)); + assertThrows(NullPointerException.class, () -> stmt.enquoteIdentifier(null, alwaysQuote)); } /* @@ -113,7 +114,7 @@ public class StatementTests extends BaseTest { */ @Test public void test06() throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> stmt.isSimpleIdentifier(null)); + assertThrows(NullPointerException.class, () -> stmt.isSimpleIdentifier(null)); } /* @@ -132,6 +133,6 @@ public class StatementTests extends BaseTest { */ @Test public void test08() throws SQLException { - Assertions.assertThrows(NullPointerException.class, () -> stmt.enquoteNCharLiteral(null)); + assertThrows(NullPointerException.class, () -> stmt.enquoteNCharLiteral(null)); } } diff --git a/test/jdk/java/sql/junit/test/sql/TimeTests.java b/test/jdk/java/sql/junit/test/sql/TimeTests.java index d6cfa370c09..5ed33bc7245 100644 --- a/test/jdk/java/sql/junit/test/sql/TimeTests.java +++ b/test/jdk/java/sql/junit/test/sql/TimeTests.java @@ -26,7 +26,6 @@ import java.sql.Time; import java.time.LocalTime; import java.util.stream.Stream; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -43,7 +42,7 @@ public class TimeTests extends BaseTest { @Test public void test01() { Time t = Time.valueOf("08:30:59"); - Assertions.assertThrows(IllegalArgumentException.class, t::getYear); + assertThrows(IllegalArgumentException.class, t::getYear); } /* @@ -52,7 +51,7 @@ public class TimeTests extends BaseTest { @Test public void test02() { Time t = Time.valueOf("08:30:59"); - Assertions.assertThrows(IllegalArgumentException.class, t::getMonth); + assertThrows(IllegalArgumentException.class, t::getMonth); } /* @@ -61,7 +60,7 @@ public class TimeTests extends BaseTest { @Test public void test03() { Time t = Time.valueOf("08:30:59"); - Assertions.assertThrows(IllegalArgumentException.class, t::getDay); + assertThrows(IllegalArgumentException.class, t::getDay); } /** @@ -70,7 +69,7 @@ public class TimeTests extends BaseTest { @Test public void test04() { Time t = Time.valueOf("08:30:59"); - Assertions.assertThrows(IllegalArgumentException.class, t::getDate); + assertThrows(IllegalArgumentException.class, t::getDate); } /* @@ -79,7 +78,7 @@ public class TimeTests extends BaseTest { @Test public void test05() { Time t = Time.valueOf("08:30:59"); - Assertions.assertThrows(IllegalArgumentException.class, () -> t.setYear(8)); + assertThrows(IllegalArgumentException.class, () -> t.setYear(8)); } /* @@ -88,7 +87,7 @@ public class TimeTests extends BaseTest { @Test public void test06() { Time t = Time.valueOf("08:30:59"); - Assertions.assertThrows(IllegalArgumentException.class, () -> t.setMonth(8)); + assertThrows(IllegalArgumentException.class, () -> t.setMonth(8)); } /* @@ -97,7 +96,7 @@ public class TimeTests extends BaseTest { @Test public void test07() { Time t = Time.valueOf("08:30:59"); - Assertions.assertThrows(IllegalArgumentException.class, () -> t.setDate(30)); + assertThrows(IllegalArgumentException.class, () -> t.setDate(30)); } /* @@ -106,7 +105,7 @@ public class TimeTests extends BaseTest { @Test public void test08() { Time t = Time.valueOf("08:30:59"); - Assertions.assertThrows(IllegalArgumentException.class, t::getDate); + assertThrows(IllegalArgumentException.class, t::getDate); } /* @@ -137,7 +136,7 @@ public class TimeTests extends BaseTest { @Test public void test11() throws Exception { LocalTime ld = null; - Assertions.assertThrows(NullPointerException.class, () -> Time.valueOf(ld)); + assertThrows(NullPointerException.class, () -> Time.valueOf(ld)); } /* @@ -147,7 +146,7 @@ public class TimeTests extends BaseTest { @Test public void test12() throws Exception { Time t = new Time(System.currentTimeMillis()); - Assertions.assertThrows(UnsupportedOperationException.class, t::toInstant); + assertThrows(UnsupportedOperationException.class, t::toInstant); } /* @@ -192,7 +191,7 @@ public class TimeTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidTimeValues") public void test16(String time) throws Exception { - Assertions.assertThrows(IllegalArgumentException.class, () -> Time.valueOf(time)); + assertThrows(IllegalArgumentException.class, () -> Time.valueOf(time)); } /* diff --git a/test/jdk/java/sql/junit/test/sql/TimestampTests.java b/test/jdk/java/sql/junit/test/sql/TimestampTests.java index e90597e6092..1e25adf3af7 100644 --- a/test/jdk/java/sql/junit/test/sql/TimestampTests.java +++ b/test/jdk/java/sql/junit/test/sql/TimestampTests.java @@ -33,7 +33,6 @@ import java.util.TimeZone; import java.util.stream.Stream; import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -73,7 +72,7 @@ public class TimestampTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidTimestampValues") public void test(String ts) throws Exception { - Assertions.assertThrows(IllegalArgumentException.class, () -> Timestamp.valueOf(ts)); + assertThrows(IllegalArgumentException.class, () -> Timestamp.valueOf(ts)); } /* @@ -273,7 +272,7 @@ public class TimestampTests extends BaseTest { @Test public void test17() throws Exception { Timestamp ts1 = Timestamp.valueOf("1996-12-13 14:15:25.745634"); - Assertions.assertThrows(NullPointerException.class, () -> ts1.before(null)); + assertThrows(NullPointerException.class, () -> ts1.before(null)); } /* @@ -326,7 +325,7 @@ public class TimestampTests extends BaseTest { @Test public void test22() throws Exception { Timestamp ts1 = Timestamp.valueOf("1966-08-30 08:08:08"); - Assertions.assertThrows(NullPointerException.class, () -> ts1.after(null)); + assertThrows(NullPointerException.class, () -> ts1.after(null)); } /* @@ -486,7 +485,7 @@ public class TimestampTests extends BaseTest { @Test public void test38() throws Exception { Timestamp ts1 = Timestamp.valueOf("1961-08-30 00:00:00"); - Assertions.assertThrows(IllegalArgumentException.class, () -> ts1.setNanos(-1)); + assertThrows(IllegalArgumentException.class, () -> ts1.setNanos(-1)); } @@ -497,7 +496,7 @@ public class TimestampTests extends BaseTest { public void test39() throws Exception { int nanos = 999999999; Timestamp ts1 = Timestamp.valueOf("1961-08-30 00:00:00"); - Assertions.assertThrows(IllegalArgumentException.class, () -> ts1.setNanos(nanos + 1)); + assertThrows(IllegalArgumentException.class, () -> ts1.setNanos(nanos + 1)); } /* @@ -551,7 +550,7 @@ public class TimestampTests extends BaseTest { @Test public void test44() throws Exception { LocalDateTime ldt = null; - Assertions.assertThrows(NullPointerException.class, () -> Timestamp.valueOf(ldt)); + assertThrows(NullPointerException.class, () -> Timestamp.valueOf(ldt)); } /* @@ -582,7 +581,7 @@ public class TimestampTests extends BaseTest { @Test public void test47() throws Exception { Instant instant = null; - Assertions.assertThrows(NullPointerException.class, () -> Timestamp.from(instant)); + assertThrows(NullPointerException.class, () -> Timestamp.from(instant)); } // Added SQE tests diff --git a/test/jdk/javax/sql/junit/test/rowset/CommonRowSetTests.java b/test/jdk/javax/sql/junit/test/rowset/CommonRowSetTests.java index c5c2669193d..4dcbbf7ea76 100644 --- a/test/jdk/javax/sql/junit/test/rowset/CommonRowSetTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/CommonRowSetTests.java @@ -51,9 +51,11 @@ import javax.sql.rowset.RowSetFactory; import javax.sql.rowset.RowSetMetaDataImpl; import javax.sql.rowset.RowSetProvider; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -102,7 +104,7 @@ public abstract class CommonRowSetTests extends BaseTest { try { rsf = RowSetProvider.newFactory(); } catch (SQLException ex) { - Assertions.fail(ex.getMessage()); + fail(ex.getMessage()); } } @@ -542,7 +544,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0004(RowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.setConcurrency(ResultSet.CLOSE_CURSORS_AT_COMMIT); }); } @@ -576,7 +578,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0007(RowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { String dsname = ""; rs.setDataSourceName(dsname); }); @@ -628,7 +630,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0013(RowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.setFetchSize(-1); }); } @@ -640,7 +642,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0014(RowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.setMaxRows(5); rs.setFetchSize(rs.getMaxRows() + 1); }); @@ -669,7 +671,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0016(RowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.setMaxFieldSize(-1); }); } @@ -798,7 +800,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0027(RowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.setQueryTimeout(-1); }); } @@ -855,7 +857,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0100(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { InputStream is = null; rs.setAsciiStream(1, is); }); @@ -868,7 +870,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0101(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { InputStream is = null; rs.setAsciiStream("one", is); }); @@ -881,7 +883,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0102(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { InputStream is = null; rs.setAsciiStream("one", is, query.length()); }); @@ -894,7 +896,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0103(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { InputStream is = null; rs.setBinaryStream(1, is); }); @@ -907,7 +909,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0104(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { InputStream is = null; rs.setBinaryStream("one", is); }); @@ -920,7 +922,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0105(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { InputStream is = null; rs.setBinaryStream("one", is, query.length()); }); @@ -933,7 +935,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0106(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setBigDecimal("one", BigDecimal.ONE); }); } @@ -945,7 +947,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0107(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { InputStream is = null; rs.setBlob(1, is); }); @@ -958,7 +960,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0108(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { InputStream is = null; rs.setBlob("one", is); }); @@ -971,7 +973,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0109(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { InputStream is = null; rs.setBlob("one", is, query.length()); }); @@ -984,7 +986,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0110(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setBlob("one", new StubBlob()); }); } @@ -996,7 +998,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0111(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setBoolean("one", true); }); } @@ -1008,7 +1010,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0112(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { byte b = 1; rs.setByte("one", b); }); @@ -1021,7 +1023,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0113(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { byte b = 1; rs.setBytes("one", new byte[10]); }); @@ -1034,7 +1036,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0114(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { Reader rdr = null; rs.setCharacterStream("one", rdr, query.length()); }); @@ -1047,7 +1049,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0115(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { Reader rdr = null; rs.setCharacterStream("one", rdr); }); @@ -1060,7 +1062,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0116(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { Reader rdr = null; rs.setCharacterStream(1, rdr); }); @@ -1073,7 +1075,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0117(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { Reader rdr = null; rs.setClob(1, rdr); }); @@ -1086,7 +1088,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0118(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { Reader rdr = null; rs.setClob("one", rdr); }); @@ -1099,7 +1101,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0119(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { Reader rdr = null; rs.setClob("one", rdr, query.length()); }); @@ -1112,7 +1114,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0120(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setClob("one", new StubClob()); }); } @@ -1124,7 +1126,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0121(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setDate("one", Date.valueOf(LocalDate.now())); }); } @@ -1136,7 +1138,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0122(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setDate("one", Date.valueOf(LocalDate.now()), Calendar.getInstance()); }); @@ -1149,7 +1151,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0123(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setTime("one", Time.valueOf(LocalTime.now())); }); } @@ -1161,7 +1163,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0124(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setTime("one", Time.valueOf(LocalTime.now()), Calendar.getInstance()); }); @@ -1174,7 +1176,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0125(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setTimestamp("one", Timestamp.valueOf(LocalDateTime.now())); }); } @@ -1186,7 +1188,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0126(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setTimestamp("one", Timestamp.valueOf(LocalDateTime.now()), Calendar.getInstance()); }); @@ -1199,7 +1201,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0127(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setDouble("one", 2.0d); }); } @@ -1211,7 +1213,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0128(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setFloat("one", 2.0f); }); } @@ -1223,7 +1225,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0129(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setInt("one", 21); }); } @@ -1235,7 +1237,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0130(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setLong("one", 21l); }); } @@ -1247,7 +1249,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0131(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { Reader rdr = null; rs.setNCharacterStream("one", rdr, query.length()); }); @@ -1260,7 +1262,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0132(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { Reader rdr = null; rs.setNCharacterStream("one", rdr); }); @@ -1273,7 +1275,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0133(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { Reader rdr = null; rs.setNCharacterStream(1, rdr); }); @@ -1286,7 +1288,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0134(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { Reader rdr = null; rs.setNCharacterStream(1, rdr, query.length()); }); @@ -1299,7 +1301,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0135(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { Reader rdr = null; rs.setClob("one", rdr); }); @@ -1312,7 +1314,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0136(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { Reader rdr = null; rs.setClob("one", rdr, query.length()); }); @@ -1325,7 +1327,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0137(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setNClob("one", new StubNClob()); }); } @@ -1337,7 +1339,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0138(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { Reader rdr = null; rs.setNClob(1, rdr); }); @@ -1350,7 +1352,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0139(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { Reader rdr = null; rs.setNClob(1, rdr, query.length()); }); @@ -1363,7 +1365,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0140(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setNClob(1, new StubNClob()); }); } @@ -1375,7 +1377,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0141(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setNString(1, query); }); } @@ -1387,7 +1389,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0142(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setNull("one", Types.INTEGER); }); } @@ -1399,7 +1401,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0143(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setNull("one", Types.INTEGER, "my.type"); }); } @@ -1411,7 +1413,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0144(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setObject("one", query, Types.VARCHAR); }); } @@ -1423,7 +1425,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0145(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setObject("one", query, Types.VARCHAR, 0); }); } @@ -1435,7 +1437,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0146(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setObject("one", query); }); } @@ -1447,7 +1449,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0147(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { RowId aRowid = null; rs.setRowId("one", aRowid); }); @@ -1460,7 +1462,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0148(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setSQLXML("one", new StubSQLXML()); }); } @@ -1472,7 +1474,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0149(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setSQLXML(1, new StubSQLXML()); }); } @@ -1484,7 +1486,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0150(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setNString(1, query); }); } @@ -1496,7 +1498,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0151(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { rs.setNString("one", query); }); } @@ -1508,7 +1510,7 @@ public abstract class CommonRowSetTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonRowSetTest0152(RowSet rs) throws Exception { - Assertions.assertThrows(SQLFeatureNotSupportedException.class, () -> { + assertThrows(SQLFeatureNotSupportedException.class, () -> { short val = 21; rs.setShort("one", val); }); diff --git a/test/jdk/javax/sql/junit/test/rowset/RowSetMetaDataTests.java b/test/jdk/javax/sql/junit/test/rowset/RowSetMetaDataTests.java index 839f9361fc2..7241d284e07 100644 --- a/test/jdk/javax/sql/junit/test/rowset/RowSetMetaDataTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/RowSetMetaDataTests.java @@ -30,7 +30,6 @@ import java.util.stream.Stream; import javax.sql.RowSetMetaData; import javax.sql.rowset.RowSetMetaDataImpl; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -60,7 +59,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.getCatalogName(col); }); } @@ -71,7 +70,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test01(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.getColumnClassName(col); }); } @@ -82,7 +81,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test02(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.getColumnDisplaySize(col); }); } @@ -93,7 +92,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test03(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.getColumnLabel(col); }); } @@ -104,7 +103,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test04(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.getColumnName(col); }); } @@ -115,7 +114,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test05(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.getColumnType(col); }); } @@ -126,7 +125,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test06(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.getColumnTypeName(col); }); } @@ -137,7 +136,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test07(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.getPrecision(col); }); } @@ -148,7 +147,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test08(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.getScale(col); }); } @@ -159,7 +158,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test09(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.getSchemaName(col); }); } @@ -170,7 +169,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test10(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.getTableName(col); }); } @@ -181,7 +180,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test11(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.isAutoIncrement(col); }); } @@ -192,7 +191,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test12(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.isCaseSensitive(col); }); } @@ -203,7 +202,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test13(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.isCurrency(col); }); } @@ -214,7 +213,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test14(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.isDefinitelyWritable(col); }); } @@ -225,7 +224,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test15(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.isNullable(col); }); } @@ -236,7 +235,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test16(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.isReadOnly(col); }); } @@ -247,7 +246,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test17(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.isSearchable(col); }); } @@ -258,7 +257,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test18(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.isSigned(col); }); } @@ -269,7 +268,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test19(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.isWritable(col); }); } @@ -280,7 +279,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test20(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setAutoIncrement(col, true); }); } @@ -291,7 +290,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test21(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setCaseSensitive(col, true); }); } @@ -302,7 +301,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test22(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setCatalogName(col, null); }); } @@ -313,7 +312,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test23(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setColumnDisplaySize(col, 5); }); } @@ -324,7 +323,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test24(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setColumnLabel(col, "label"); }); } @@ -335,7 +334,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test25(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setColumnName(col, "F1"); }); } @@ -346,7 +345,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test26(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setColumnType(col, Types.CHAR); }); } @@ -357,7 +356,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test27(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setColumnTypeName(col, "F1"); }); } @@ -368,7 +367,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test28(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setCurrency(col, true); }); } @@ -379,7 +378,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test29(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setNullable(col, ResultSetMetaData.columnNoNulls); }); } @@ -390,7 +389,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test30(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setPrecision(col, 2); }); } @@ -401,7 +400,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test31(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setScale(col, 2); }); } @@ -412,7 +411,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test32(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setSchemaName(col, "Gotham"); }); } @@ -423,7 +422,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test33(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setSearchable(col, false); }); } @@ -434,7 +433,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test34(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setSigned(col, false); }); } @@ -445,7 +444,7 @@ public class RowSetMetaDataTests extends BaseTest { @ParameterizedTest(autoCloseArguments = false) @MethodSource("invalidColumnRanges") public void test35(Integer col) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rsmd.setTableName(col, "SUPERHEROS"); }); } diff --git a/test/jdk/javax/sql/junit/test/rowset/RowSetProviderTests.java b/test/jdk/javax/sql/junit/test/rowset/RowSetProviderTests.java index 4b7b30d66a3..25422cf0950 100644 --- a/test/jdk/javax/sql/junit/test/rowset/RowSetProviderTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/RowSetProviderTests.java @@ -33,7 +33,6 @@ import javax.sql.rowset.RowSetProvider; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -129,7 +128,7 @@ public class RowSetProviderTests extends BaseTest { */ @Test public void test03() throws SQLException { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { System.setProperty("javax.sql.rowset.RowSetFactory", "invalid.RowSetFactoryImpl"); RowSetFactory rsf = RowSetProvider.newFactory(); @@ -155,7 +154,7 @@ public class RowSetProviderTests extends BaseTest { */ @Test public void test05() throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { File f = new File(jarPath + "badFactory"); URLClassLoader loader = new URLClassLoader(new URL[]{ new URL(f.toURI().toString())}, getClass().getClassLoader()); diff --git a/test/jdk/javax/sql/junit/test/rowset/cachedrowset/CommonCachedRowSetTests.java b/test/jdk/javax/sql/junit/test/rowset/cachedrowset/CommonCachedRowSetTests.java index f060b75dd0f..bc63ce28497 100644 --- a/test/jdk/javax/sql/junit/test/rowset/cachedrowset/CommonCachedRowSetTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/cachedrowset/CommonCachedRowSetTests.java @@ -46,10 +46,11 @@ import javax.sql.rowset.spi.SyncFactory; import javax.sql.rowset.spi.SyncProvider; import javax.sql.rowset.spi.SyncProviderException; -import org.junit.jupiter.api.Assertions; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.params.ParameterizedTest; @@ -356,7 +357,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonCachedRowSetTest0000(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SyncProviderException.class, () -> { + assertThrows(SyncProviderException.class, () -> { rs.acceptChanges(); rs.close(); }); @@ -369,7 +370,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonCachedRowSetTest0001(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SyncProviderException.class, () -> { + assertThrows(SyncProviderException.class, () -> { rs.acceptChanges(null); rs.close(); }); @@ -528,7 +529,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { int[] pkeys = {1, 3}; assertNull(rs.getKeyColumns()); rs.setKeyColumns(pkeys); - Assertions.assertArrayEquals(pkeys, rs.getKeyColumns()); + assertArrayEquals(pkeys, rs.getKeyColumns()); rs.close(); } @@ -539,7 +540,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0012(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.setMatchColumn(-1); rs.close(); }); @@ -552,7 +553,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0013(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { int[] cols = {1, -1}; rs.setMatchColumn(cols); rs.close(); @@ -566,7 +567,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0014(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.setMatchColumn((String) null); rs.close(); }); @@ -579,7 +580,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0015(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { String[] cols = {"ID", null}; rs.setMatchColumn(cols); }); @@ -601,8 +602,8 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { for (int i = 0; i < actualCols.length; i++) { System.out.println(actualCols[i]); } - Assertions.assertArrayEquals(expectedCols, actualCols); - Assertions.assertArrayEquals(expectedColNames, actualColNames); + assertArrayEquals(expectedCols, actualCols); + assertArrayEquals(expectedColNames, actualColNames); rs.close(); } @@ -619,8 +620,8 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { rs.setMatchColumn(expectedColNames[0]); int[] actualCols = rs.getMatchColumnIndexes(); String[] actualColNames = rs.getMatchColumnNames(); - Assertions.assertArrayEquals(expectedCols, actualCols); - Assertions.assertArrayEquals(expectedColNames, actualColNames); + assertArrayEquals(expectedCols, actualCols); + assertArrayEquals(expectedColNames, actualColNames); rs.close(); } @@ -637,9 +638,9 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { rs.setMatchColumn(expectedCols); int[] actualCols = rs.getMatchColumnIndexes(); String[] actualColNames = rs.getMatchColumnNames(); - Assertions.assertArrayEquals(expectedCols, actualCols); - Assertions.assertArrayEquals(expectedColNames, actualColNames); - Assertions.assertArrayEquals(expectedCols, actualCols); + assertArrayEquals(expectedCols, actualCols); + assertArrayEquals(expectedColNames, actualColNames); + assertArrayEquals(expectedCols, actualCols); rs.close(); } @@ -656,8 +657,8 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { rs.setMatchColumn(expectedColNames); int[] actualCols = rs.getMatchColumnIndexes(); String[] actualColNames = rs.getMatchColumnNames(); - Assertions.assertArrayEquals(expectedCols, actualCols); - Assertions.assertArrayEquals(expectedColNames, actualColNames); + assertArrayEquals(expectedCols, actualCols); + assertArrayEquals(expectedColNames, actualColNames); rs.close(); } @@ -668,7 +669,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0020(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.setMatchColumn(1); int[] actualCols = rs.getMatchColumnIndexes(); assertTrue(actualCols != null); @@ -685,7 +686,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0021(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { String matchColumn = "ID"; rs.setMatchColumn(matchColumn); String[] actualColNames = rs.getMatchColumnNames(); @@ -703,7 +704,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0022(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { int[] expectedCols = {1, 3}; rs.setMatchColumn(expectedCols); int[] actualCols = rs.getMatchColumnIndexes(); @@ -721,7 +722,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0023(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { String[] expectedColNames = {"COF_ID", "SUP_ID"}; rs.setMatchColumn(expectedColNames); String[] actualColNames = rs.getMatchColumnNames(); @@ -749,7 +750,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0025(RowSet rs) throws SQLException { - Assertions.assertArrayEquals(COFFEE_HOUSES_PRIMARY_KEYS, getPrimaryKeys(rs)); + assertArrayEquals(COFFEE_HOUSES_PRIMARY_KEYS, getPrimaryKeys(rs)); rs.close(); } @@ -767,13 +768,13 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { }; int rowToDelete = 10035; // All rows should be found - Assertions.assertArrayEquals(COFFEE_HOUSES_PRIMARY_KEYS, getPrimaryKeys(rs)); + assertArrayEquals(COFFEE_HOUSES_PRIMARY_KEYS, getPrimaryKeys(rs)); // Delete the row assertTrue(deleteRowByPrimaryKey(rs, rowToDelete, 1)); // With setShowDeleted(false) which is the default, // the deleted row should not be visible assertFalse(findRowByPrimaryKey(rs, rowToDelete, 1)); - Assertions.assertArrayEquals(afterDelete, getPrimaryKeys(rs)); + assertArrayEquals(afterDelete, getPrimaryKeys(rs)); assertTrue(rs.size() == COFFEE_HOUSES_ROWS); // With setShowDeleted(true), the deleted row should be visible rs.setShowDeleted(true); @@ -813,7 +814,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonCachedRowSetTest0029(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.setPageSize(-1); rs.close(); }); @@ -826,7 +827,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonCachedRowSetTest0030(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.nextPage(); rs.close(); }); @@ -839,7 +840,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonCachedRowSetTest0031(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.previousPage(); rs.close(); }); @@ -853,7 +854,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonCachedRowSetTest0032(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.execute(null); rs.close(); }); @@ -866,7 +867,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowSetType") public void commonCachedRowSetTest0033(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.execute(); rs.close(); }); @@ -882,8 +883,8 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { "Sacramento", "Carmel", "LA", "Olympia", "Seattle", "SF", "LA", "San Jose", "Eugene"}; rs.beforeFirst(); - Assertions.assertArrayEquals(cities, rs.toCollection(2).toArray()); - Assertions.assertArrayEquals(cities, rs.toCollection("CITY").toArray()); + assertArrayEquals(cities, rs.toCollection(2).toArray()); + assertArrayEquals(cities, rs.toCollection("CITY").toArray()); rs.close(); } @@ -1243,7 +1244,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0044(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.insertRow(); rs.undoDelete(); rs.close(); @@ -1257,7 +1258,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0045(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.setShowDeleted(true); rs.beforeFirst(); rs.undoDelete(); @@ -1272,7 +1273,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0046(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.setShowDeleted(true); rs.afterLast(); rs.undoDelete(); @@ -1287,7 +1288,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0047(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.insertRow(); rs.undoUpdate(); rs.close(); @@ -1301,7 +1302,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0048(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.setShowDeleted(true); rs.beforeFirst(); rs.undoUpdate(); @@ -1316,7 +1317,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0049(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.setShowDeleted(true); rs.afterLast(); rs.undoUpdate(); @@ -1331,7 +1332,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0050(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.insertRow(); rs.undoInsert(); rs.close(); @@ -1345,7 +1346,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0051(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.setShowDeleted(true); rs.beforeFirst(); rs.undoInsert(); @@ -1360,7 +1361,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffeeHouses") public void commonCachedRowSetTest0052(CachedRowSet rs) throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { rs.setShowDeleted(true); rs.afterLast(); rs.undoInsert(); @@ -1503,12 +1504,12 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { assertTrue(rs1.getInt(1) == origId); assertTrue(rs1.getString(2).equals(origCoffee)); assertTrue(rs1.getInt(5) == origSales); - Assertions.assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(rs1)); + assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(rs1)); // Check current rowset assertTrue(rs.getInt(1) == id); assertTrue(rs.getString(2).equals(coffee)); assertTrue(rs.getInt(5) == sales); - Assertions.assertArrayEquals(updatedPkeys, getPrimaryKeys(rs)); + assertArrayEquals(updatedPkeys, getPrimaryKeys(rs)); } rs.close(); } @@ -1553,7 +1554,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { assertTrue(rs.getInt(1) == id); assertTrue(rs.getString(2).equals(coffee)); assertTrue(rs.getInt(5) == sales); - Assertions.assertArrayEquals(updatedPkeys, getPrimaryKeys(rs)); + assertArrayEquals(updatedPkeys, getPrimaryKeys(rs)); } rs.close(); } @@ -1699,7 +1700,7 @@ public abstract class CommonCachedRowSetTests extends CommonRowSetTests { rs.beforeFirst(); crs1.populate(rs, startingRow); assertEquals(COFFEE_HOUSES_ROWS - startingRow + 1, crs1.size()); - Assertions.assertArrayEquals(expectedRows, getPrimaryKeys(crs1)); + assertArrayEquals(expectedRows, getPrimaryKeys(crs1)); } rs.close(); } diff --git a/test/jdk/javax/sql/junit/test/rowset/filteredrowset/FilteredRowSetTests.java b/test/jdk/javax/sql/junit/test/rowset/filteredrowset/FilteredRowSetTests.java index aee591a1923..55d9323f373 100644 --- a/test/jdk/javax/sql/junit/test/rowset/filteredrowset/FilteredRowSetTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/filteredrowset/FilteredRowSetTests.java @@ -28,7 +28,8 @@ import javax.sql.rowset.FilteredRowSet; import javax.sql.rowset.Predicate; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Assertions; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; import org.junit.jupiter.api.BeforeEach; @@ -88,7 +89,7 @@ public class FilteredRowSetTests extends CommonWebRowSetTests { 10023, 10040, 10042, 10024, 10039, 10041, 10035, 10037, 10034 }; frs.setFilter(new PrimaryKeyFilter(10000, 10999, 1)); - Assertions.assertArrayEquals(expectedKeys, getPrimaryKeys(frs)); + assertArrayEquals(expectedKeys, getPrimaryKeys(frs)); } /* @@ -101,7 +102,7 @@ public class FilteredRowSetTests extends CommonWebRowSetTests { 10023, 10040, 10042, 10024, 10039, 10041, 10035, 10037, 10034 }; frs.setFilter(new PrimaryKeyFilter(10000, 10999, "STORE_ID")); - Assertions.assertArrayEquals(expectedKeys, getPrimaryKeys(frs)); + assertArrayEquals(expectedKeys, getPrimaryKeys(frs)); } @@ -116,7 +117,7 @@ public class FilteredRowSetTests extends CommonWebRowSetTests { }; String[] cityArray = {"SF", "LA"}; frs.setFilter(new CityFilter(cityArray, 2)); - Assertions.assertArrayEquals(expectedKeys, getPrimaryKeys(frs)); + assertArrayEquals(expectedKeys, getPrimaryKeys(frs)); } /* @@ -130,7 +131,7 @@ public class FilteredRowSetTests extends CommonWebRowSetTests { }; String[] cityArray = {"SF", "LA"}; frs.setFilter(new CityFilter(cityArray, "CITY")); - Assertions.assertArrayEquals(expectedKeys, getPrimaryKeys(frs)); + assertArrayEquals(expectedKeys, getPrimaryKeys(frs)); } diff --git a/test/jdk/javax/sql/junit/test/rowset/joinrowset/JoinRowSetTests.java b/test/jdk/javax/sql/junit/test/rowset/joinrowset/JoinRowSetTests.java index 2028a50b0f9..92ce09bcf85 100644 --- a/test/jdk/javax/sql/junit/test/rowset/joinrowset/JoinRowSetTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/joinrowset/JoinRowSetTests.java @@ -33,7 +33,6 @@ import javax.sql.rowset.JoinRowSet; import javax.sql.rowset.RowSetMetaDataImpl; import javax.sql.rowset.WebRowSet; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -41,6 +40,8 @@ import org.junit.jupiter.params.provider.MethodSource; import test.rowset.webrowset.CommonWebRowSetTests; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; + public class JoinRowSetTests extends CommonWebRowSetTests { private final String SUPPLIERS_TABLE = "SUPPLIERS"; @@ -180,7 +181,7 @@ public class JoinRowSetTests extends CommonWebRowSetTests { results.add(jrs.getInt("COF_ID")); } } - Assertions.assertArrayEquals(EXPECTED, results.toArray()); + assertArrayEquals(EXPECTED, results.toArray()); } /* diff --git a/test/jdk/javax/sql/junit/test/rowset/serial/SQLInputImplTests.java b/test/jdk/javax/sql/junit/test/rowset/serial/SQLInputImplTests.java index 07fc7f3abd4..33efda61c4e 100644 --- a/test/jdk/javax/sql/junit/test/rowset/serial/SQLInputImplTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/serial/SQLInputImplTests.java @@ -34,7 +34,6 @@ import java.util.HashMap; import java.util.Map; import javax.sql.rowset.serial.SQLInputImpl; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -73,7 +72,7 @@ public class SQLInputImplTests extends BaseTest { */ @Test public void test() throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { SQLInputImpl x = new SQLInputImpl(null, map); }); } @@ -84,7 +83,7 @@ public class SQLInputImplTests extends BaseTest { */ @Test public void test02() throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { SQLInputImpl x = new SQLInputImpl(typeValues, null); }); } diff --git a/test/jdk/javax/sql/junit/test/rowset/serial/SQLOutputImplTests.java b/test/jdk/javax/sql/junit/test/rowset/serial/SQLOutputImplTests.java index 04ce2731a5e..83712e81396 100644 --- a/test/jdk/javax/sql/junit/test/rowset/serial/SQLOutputImplTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/serial/SQLOutputImplTests.java @@ -42,7 +42,6 @@ import javax.sql.rowset.serial.SerialDatalink; import javax.sql.rowset.serial.SerialRef; import javax.sql.rowset.serial.SerialStruct; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -83,7 +82,7 @@ public class SQLOutputImplTests extends BaseTest { */ @Test public void test() throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { SQLOutputImpl x = new SQLOutputImpl(null, map); }); } @@ -94,7 +93,7 @@ public class SQLOutputImplTests extends BaseTest { */ @Test public void test02() throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { SQLOutputImpl x = new SQLOutputImpl(results, null); }); } diff --git a/test/jdk/javax/sql/junit/test/rowset/serial/SerialArrayTests.java b/test/jdk/javax/sql/junit/test/rowset/serial/SerialArrayTests.java index fcaa79b0d98..892de9416a1 100644 --- a/test/jdk/javax/sql/junit/test/rowset/serial/SerialArrayTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/serial/SerialArrayTests.java @@ -30,7 +30,6 @@ import java.util.Map; import javax.sql.rowset.serial.SerialArray; import javax.sql.rowset.serial.SerialException; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -66,7 +65,7 @@ public class SerialArrayTests extends BaseTest { */ @Test public void test02() throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { SerialArray sa = new SerialArray(a, null); }); } @@ -76,7 +75,7 @@ public class SerialArrayTests extends BaseTest { */ @Test public void test03() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialArray sa = new SerialArray(a); sa.getResultSet(); }); @@ -87,7 +86,7 @@ public class SerialArrayTests extends BaseTest { */ @Test public void test04() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialArray sa = new SerialArray(a); sa.getResultSet(null); }); @@ -98,7 +97,7 @@ public class SerialArrayTests extends BaseTest { */ @Test public void test05() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialArray sa = new SerialArray(a); sa.getResultSet(1, 1); }); @@ -109,7 +108,7 @@ public class SerialArrayTests extends BaseTest { */ @Test public void test06() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialArray sa = new SerialArray(a); sa.getResultSet(1, 1, null); }); @@ -121,7 +120,7 @@ public class SerialArrayTests extends BaseTest { */ @Test public void test07() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialArray sa = new SerialArray(a); sa.free(); sa.getArray(); @@ -134,7 +133,7 @@ public class SerialArrayTests extends BaseTest { */ @Test public void test08() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialArray sa = new SerialArray(a); sa.free(); sa.getArray(map); @@ -147,7 +146,7 @@ public class SerialArrayTests extends BaseTest { */ @Test public void test09() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialArray sa = new SerialArray(a); sa.free(); sa.getArray(1, 1, map); @@ -160,7 +159,7 @@ public class SerialArrayTests extends BaseTest { */ @Test public void test10() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialArray sa = new SerialArray(a); sa.free(); sa.getArray(1, 1); @@ -173,7 +172,7 @@ public class SerialArrayTests extends BaseTest { */ @Test public void test11() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialArray sa = new SerialArray(a); sa.free(); sa.getBaseType(); @@ -186,7 +185,7 @@ public class SerialArrayTests extends BaseTest { */ @Test public void test12() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialArray sa = new SerialArray(a); sa.free(); sa.getBaseTypeName(); diff --git a/test/jdk/javax/sql/junit/test/rowset/serial/SerialBlobTests.java b/test/jdk/javax/sql/junit/test/rowset/serial/SerialBlobTests.java index 8e7c317171c..47c53084ecc 100644 --- a/test/jdk/javax/sql/junit/test/rowset/serial/SerialBlobTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/serial/SerialBlobTests.java @@ -28,7 +28,6 @@ import java.util.Arrays; import javax.sql.rowset.serial.SerialBlob; import javax.sql.rowset.serial.SerialException; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; @@ -55,7 +54,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test01() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(new StubBlob()); sb.free(); sb.getBinaryStream(); @@ -68,7 +67,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test02() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(new StubBlob()); sb.free(); sb.getBinaryStream(1, 5); @@ -81,7 +80,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test03() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(new StubBlob()); sb.free(); sb.getBytes(1, 1); @@ -94,7 +93,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test04() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(new StubBlob()); sb.free(); sb.length(); @@ -107,7 +106,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test05() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(new StubBlob()); sb.free(); sb.position(new byte[5], 1); @@ -120,7 +119,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test06() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(new StubBlob()); sb.free(); sb.position(new StubBlob(), 1); @@ -133,7 +132,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test07() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(new StubBlob()); sb.free(); sb.setBinaryStream(5); @@ -146,7 +145,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test08() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(new StubBlob()); sb.free(); sb.setBytes(1, new byte[5]); @@ -159,7 +158,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test09() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(new StubBlob()); sb.free(); sb.setBytes(1, new byte[10], 0, 5); @@ -172,7 +171,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test10() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(new StubBlob()); sb.free(); sb.truncate(1); @@ -198,7 +197,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test12() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(bytes); InputStream is = sb.getBinaryStream(-1, 3); }); @@ -209,7 +208,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test13() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(bytes); InputStream is = sb.getBinaryStream(0, 3); }); @@ -221,7 +220,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test14() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(bytes); InputStream is = sb.getBinaryStream(0, 3); }); @@ -232,7 +231,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test15() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(bytes); InputStream is = sb.getBinaryStream(1, 0); }); @@ -243,7 +242,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test16() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(bytes); InputStream is = sb.getBinaryStream(1, 6); }); @@ -254,7 +253,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test17() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(bytes); InputStream is = sb.getBinaryStream(bytes.length + 2, 6); }); @@ -278,7 +277,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test19() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(bytes); sb.free(); SerialBlob sb2 = (SerialBlob) sb.clone(); @@ -303,7 +302,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test21() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialBlob sb = new SerialBlob(bytes); sb.setBinaryStream(3); }); @@ -493,7 +492,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test34() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { int length = -1; SerialBlob sb = new SerialBlob(bytes); int written = sb.setBytes(1, new byte[]{1}, 1, length); @@ -506,7 +505,7 @@ public class SerialBlobTests extends BaseTest { */ @Test public void test35() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { int offset = 1; int length = Integer.MAX_VALUE; SerialBlob sb = new SerialBlob(bytes); diff --git a/test/jdk/javax/sql/junit/test/rowset/serial/SerialClobTests.java b/test/jdk/javax/sql/junit/test/rowset/serial/SerialClobTests.java index f1eaff46082..256df753931 100644 --- a/test/jdk/javax/sql/junit/test/rowset/serial/SerialClobTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/serial/SerialClobTests.java @@ -29,7 +29,6 @@ import java.io.Writer; import javax.sql.rowset.serial.SerialClob; import javax.sql.rowset.serial.SerialException; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -62,7 +61,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test01() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.getCharacterStream(); @@ -75,7 +74,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test02() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(chars); sc.free(); sc.getCharacterStream(); @@ -88,7 +87,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test03() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.getCharacterStream(1, 5); @@ -101,7 +100,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test04() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.getSubString(1, 1); @@ -114,7 +113,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test05() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.truncate(1); @@ -127,7 +126,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test06() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.getAsciiStream(); @@ -139,7 +138,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test07() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.length(); @@ -152,7 +151,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test08() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.position("hello", 1); @@ -165,7 +164,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test09() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.position(new StubClob(), 1); @@ -178,7 +177,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test10() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.setAsciiStream(5); @@ -191,7 +190,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test11() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.setCharacterStream(5); @@ -204,7 +203,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test12() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.setString(1, "hello"); @@ -217,7 +216,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test13() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(new StubClob()); sc.free(); sc.setString(1, "hello", 0, 5); @@ -230,7 +229,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test14() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(chars); sc.getCharacterStream(-1, 5); }); @@ -242,7 +241,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test15() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(chars); sc.getCharacterStream(0, 5); }); @@ -254,7 +253,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test16() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(chars); sc.getCharacterStream(1, 100); }); @@ -266,7 +265,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test17() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(chars); sc.getCharacterStream(1, 0); }); @@ -278,7 +277,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test18() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialClob sc = new SerialClob(chars); sc.getCharacterStream(100, 5); }); @@ -547,7 +546,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test39() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { String val1 = "hello"; int offset = val1.length() + 1; SerialClob sc = new SerialClob(chars); @@ -596,7 +595,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test42() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { int length = -1; SerialClob sc = new SerialClob(chars); int written = sc.setString(1, "hello", 1, length); @@ -609,7 +608,7 @@ public class SerialClobTests extends BaseTest { */ @Test public void test43() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { int offset = 1; int length = Integer.MAX_VALUE; SerialClob sc = new SerialClob(chars); diff --git a/test/jdk/javax/sql/junit/test/rowset/serial/SerialDataLinkTests.java b/test/jdk/javax/sql/junit/test/rowset/serial/SerialDataLinkTests.java index dad239021d8..12c1341161d 100644 --- a/test/jdk/javax/sql/junit/test/rowset/serial/SerialDataLinkTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/serial/SerialDataLinkTests.java @@ -26,7 +26,6 @@ import java.net.URL; import javax.sql.rowset.serial.SerialDatalink; import javax.sql.rowset.serial.SerialException; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -51,7 +50,7 @@ public class SerialDataLinkTests extends BaseTest { */ @Test public void test() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialDatalink dl1 = new SerialDatalink(null); }); } diff --git a/test/jdk/javax/sql/junit/test/rowset/serial/SerialJavaObjectTests.java b/test/jdk/javax/sql/junit/test/rowset/serial/SerialJavaObjectTests.java index 05eeadb39ac..e521125df97 100644 --- a/test/jdk/javax/sql/junit/test/rowset/serial/SerialJavaObjectTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/serial/SerialJavaObjectTests.java @@ -28,7 +28,6 @@ import javax.sql.rowset.RowSetMetaDataImpl; import javax.sql.rowset.serial.SerialException; import javax.sql.rowset.serial.SerialJavaObject; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -43,7 +42,7 @@ public class SerialJavaObjectTests extends BaseTest { */ @Test public void test() throws Exception { - Assertions.assertThrows(NullPointerException.class, () -> { + assertThrows(NullPointerException.class, () -> { SerialJavaObject sjo = new SerialJavaObject(null); }); } @@ -55,7 +54,7 @@ public class SerialJavaObjectTests extends BaseTest { @Test @Disabled public void test01() throws Exception { - Assertions.assertThrows(SerialException.class, () -> { + assertThrows(SerialException.class, () -> { SerialJavaObject sjo = new SerialJavaObject(new RowSetMetaDataImpl()); }); } diff --git a/test/jdk/javax/sql/junit/test/rowset/serial/SerialRefTests.java b/test/jdk/javax/sql/junit/test/rowset/serial/SerialRefTests.java index 78b293d017f..1b4e72593b0 100644 --- a/test/jdk/javax/sql/junit/test/rowset/serial/SerialRefTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/serial/SerialRefTests.java @@ -28,7 +28,6 @@ import java.util.HashMap; import java.util.Map; import javax.sql.rowset.serial.SerialRef; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Disabled; @@ -57,7 +56,7 @@ public class SerialRefTests extends BaseTest { */ @Test public void test01() throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { SerialRef sr = new SerialRef(null); }); } @@ -68,7 +67,7 @@ public class SerialRefTests extends BaseTest { */ @Test public void test02() throws Exception { - Assertions.assertThrows(SQLException.class, () -> { + assertThrows(SQLException.class, () -> { SerialRef sr = new SerialRef(new StubRef(null, hero)); }); } diff --git a/test/jdk/javax/sql/junit/test/rowset/spi/SyncFactoryTests.java b/test/jdk/javax/sql/junit/test/rowset/spi/SyncFactoryTests.java index b8326096ab3..214a3abfd4e 100644 --- a/test/jdk/javax/sql/junit/test/rowset/spi/SyncFactoryTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/spi/SyncFactoryTests.java @@ -34,7 +34,6 @@ import javax.sql.rowset.spi.SyncFactory; import javax.sql.rowset.spi.SyncFactoryException; import javax.sql.rowset.spi.SyncProvider; -import org.junit.jupiter.api.Assertions; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -125,7 +124,7 @@ public class SyncFactoryTests { */ @Test public void test03() throws SyncFactoryException { - Assertions.assertThrows(SyncFactoryException.class, () -> { + assertThrows(SyncFactoryException.class, () -> { SyncProvider p = SyncFactory.getInstance(null); }); } @@ -135,7 +134,7 @@ public class SyncFactoryTests { */ @Test public void test04() throws SyncFactoryException { - Assertions.assertThrows(SyncFactoryException.class, () -> { + assertThrows(SyncFactoryException.class, () -> { Logger l = SyncFactory.getLogger(); }); } @@ -188,7 +187,7 @@ public class SyncFactoryTests { */ @Test public void test08() throws Exception { - Assertions.assertThrows(SyncFactoryException.class, () -> { + assertThrows(SyncFactoryException.class, () -> { SyncFactory.setJNDIContext(null); }); } diff --git a/test/jdk/javax/sql/junit/test/rowset/webrowset/CommonWebRowSetTests.java b/test/jdk/javax/sql/junit/test/rowset/webrowset/CommonWebRowSetTests.java index 1197d86c87b..023adc8254b 100644 --- a/test/jdk/javax/sql/junit/test/rowset/webrowset/CommonWebRowSetTests.java +++ b/test/jdk/javax/sql/junit/test/rowset/webrowset/CommonWebRowSetTests.java @@ -36,7 +36,7 @@ import java.sql.ResultSet; import java.util.Arrays; import javax.sql.rowset.WebRowSet; -import org.junit.jupiter.api.Assertions; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -138,7 +138,7 @@ public abstract class CommonWebRowSetTests extends CommonCachedRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffees") public void WebRowSetTest0000(WebRowSet wrs) throws Exception { - Assertions.assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs)); + assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs)); assertEquals(COFFEES_ROWS, wrs.size()); wrs.close(); } @@ -154,7 +154,7 @@ public abstract class CommonWebRowSetTests extends CommonCachedRowSetTests { try (FileReader fr = new FileReader(COFFEE_ROWS_XML)) { wrs1.readXml(fr); } - Assertions.assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); + assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); assertEquals(COFFEES_ROWS, wrs1.size()); wrs1.close(); @@ -170,7 +170,7 @@ public abstract class CommonWebRowSetTests extends CommonCachedRowSetTests { try (FileInputStream fis = new FileInputStream(COFFEE_ROWS_XML)) { wrs1.readXml(fis); } - Assertions.assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); + assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); assertEquals(COFFEES_ROWS, wrs1.size()); wrs1.close(); } @@ -185,7 +185,7 @@ public abstract class CommonWebRowSetTests extends CommonCachedRowSetTests { public void WebRowSetTest0003(WebRowSet wrs) throws Exception { ByteArrayOutputStream baos = writeWebRowSetWithOutputStream(wrs); try (WebRowSet wrs1 = readWebRowSetWithOInputStream(baos)) { - Assertions.assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); + assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); assertEquals(COFFEES_ROWS, wrs1.size()); } } @@ -202,7 +202,7 @@ public abstract class CommonWebRowSetTests extends CommonCachedRowSetTests { rs.beforeFirst(); ByteArrayOutputStream baos = writeWebRowSetWithOutputStream(rs); try (WebRowSet wrs1 = readWebRowSetWithOInputStream(baos)) { - Assertions.assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); + assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); assertEquals(COFFEES_ROWS, wrs1.size()); } } @@ -217,7 +217,7 @@ public abstract class CommonWebRowSetTests extends CommonCachedRowSetTests { public void WebRowSetTest0005(WebRowSet wrs) throws Exception { ByteArrayOutputStream baos = writeWebRowSetWithOutputStreamWithWriter(wrs); try (WebRowSet wrs1 = readWebRowSetWithOInputStreamWithReader(baos)) { - Assertions.assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); + assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); assertEquals(COFFEES_ROWS, wrs1.size()); } } @@ -234,7 +234,7 @@ public abstract class CommonWebRowSetTests extends CommonCachedRowSetTests { rs.beforeFirst(); ByteArrayOutputStream baos = writeWebRowSetWithOutputStreamWithWriter(rs); try (WebRowSet wrs1 = readWebRowSetWithOInputStreamWithReader(baos)) { - Assertions.assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); + assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); assertEquals(COFFEES_ROWS, wrs1.size()); } } @@ -247,9 +247,9 @@ public abstract class CommonWebRowSetTests extends CommonCachedRowSetTests { @ParameterizedTest(autoCloseArguments = false) @MethodSource("rowsetUsingCoffees") public void WebRowSetTest0007(WebRowSet wrs) throws Exception { - Assertions.assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs)); + assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs)); int[] rowsToDelete = {2, 4}; - Assertions.assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs)); + assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs)); for (int row : rowsToDelete) { assertTrue(deleteRowByPrimaryKey(wrs, row, 1)); } @@ -281,7 +281,7 @@ public abstract class CommonWebRowSetTests extends CommonCachedRowSetTests { FileInputStream fis = new FileInputStream(COFFEE_ROWS_XML); wrs1.readXml(fis); assertTrue(wrs1.size() == COFFEES_ROWS); - Assertions.assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); + assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); // Validate that the rows are not marked as deleted, inserted or updated wrs1.beforeFirst(); while (wrs1.next()) { @@ -306,7 +306,7 @@ public abstract class CommonWebRowSetTests extends CommonCachedRowSetTests { FileInputStream fis = new FileInputStream(DELETED_COFFEE_ROWS_XML); wrs1.readXml(fis); assertTrue(wrs1.size() == COFFEES_ROWS); - Assertions.assertArrayEquals(expectedRows, getPrimaryKeys(wrs1)); + assertArrayEquals(expectedRows, getPrimaryKeys(wrs1)); // With setShowDeleted(false) which is the default, // the deleted row should not be visible for (int row : rowsToDelete) { @@ -317,7 +317,7 @@ public abstract class CommonWebRowSetTests extends CommonCachedRowSetTests { for (int row : rowsToDelete) { assertTrue(findRowByPrimaryKey(wrs1, row, 1)); } - Assertions.assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); + assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); wrs1.close(); } @@ -332,7 +332,7 @@ public abstract class CommonWebRowSetTests extends CommonCachedRowSetTests { FileInputStream fis = new FileInputStream(UPDATED_COFFEE_ROWS_XML); wrs1.readXml(fis); assertTrue(wrs1.size() == COFFEES_ROWS); - Assertions.assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); + assertArrayEquals(COFFEES_PRIMARY_KEYS, getPrimaryKeys(wrs1)); wrs1.beforeFirst(); while (wrs1.next()) { if (wrs1.getInt(1) == 3) { @@ -368,7 +368,7 @@ public abstract class CommonWebRowSetTests extends CommonCachedRowSetTests { var actual = getPrimaryKeys(wrs1); Arrays.sort(actual); Arrays.sort(expected); - Assertions.assertArrayEquals(expected, actual); + assertArrayEquals(expected, actual); wrs1.beforeFirst(); while (wrs1.next()) { if (wrs1.getInt(1) == 15 || wrs1.getInt(1) == 20) { @@ -397,7 +397,7 @@ public abstract class CommonWebRowSetTests extends CommonCachedRowSetTests { FileInputStream fis = new FileInputStream(UPDATED_INSERTED_COFFEE_ROWS_XML); wrs1.readXml(fis); assertTrue(wrs1.size() == expectedSize); - Assertions.assertArrayEquals(expected, getPrimaryKeys(wrs1)); + assertArrayEquals(expected, getPrimaryKeys(wrs1)); wrs1.beforeFirst(); while (wrs1.next()) { if (wrs1.getInt(1) == addedRowPK) {