Polish test code

Polish a few issue identified when adding checkstyle to the
build. Although checkstyle is not enforcing rules on tests,
these are a few minor changes that are still worth making.

Issue: SPR-16968
This commit is contained in:
Phillip Webb
2018-06-13 21:36:42 -07:00
committed by Juergen Hoeller
parent 81451aa800
commit 1c25cec44f
17 changed files with 99 additions and 100 deletions

View File

@@ -82,42 +82,42 @@ public class ResultSetWrappingRowSetTests {
public void testGetTimestampInt() throws Exception {
Method rset = ResultSet.class.getDeclaredMethod("getTimestamp", int.class);
Method rowset = ResultSetWrappingSqlRowSet.class.getDeclaredMethod("getTimestamp", int.class);
doTest(rset, rowset, 1, new Timestamp(1234l));
doTest(rset, rowset, 1, new Timestamp(1234L));
}
@Test
public void testGetTimestampString() throws Exception {
Method rset = ResultSet.class.getDeclaredMethod("getTimestamp", int.class);
Method rowset = ResultSetWrappingSqlRowSet.class.getDeclaredMethod("getTimestamp", String.class);
doTest(rset, rowset, "test", new Timestamp(1234l));
doTest(rset, rowset, "test", new Timestamp(1234L));
}
@Test
public void testGetDateInt() throws Exception {
Method rset = ResultSet.class.getDeclaredMethod("getDate", int.class);
Method rowset = ResultSetWrappingSqlRowSet.class.getDeclaredMethod("getDate", int.class);
doTest(rset, rowset, 1, new Date(1234l));
doTest(rset, rowset, 1, new Date(1234L));
}
@Test
public void testGetDateString() throws Exception {
Method rset = ResultSet.class.getDeclaredMethod("getDate", int.class);
Method rowset = ResultSetWrappingSqlRowSet.class.getDeclaredMethod("getDate", String.class);
doTest(rset, rowset, "test", new Date(1234l));
doTest(rset, rowset, "test", new Date(1234L));
}
@Test
public void testGetTimeInt() throws Exception {
Method rset = ResultSet.class.getDeclaredMethod("getTime", int.class);
Method rowset = ResultSetWrappingSqlRowSet.class.getDeclaredMethod("getTime", int.class);
doTest(rset, rowset, 1, new Time(1234l));
doTest(rset, rowset, 1, new Time(1234L));
}
@Test
public void testGetTimeString() throws Exception {
Method rset = ResultSet.class.getDeclaredMethod("getTime", int.class);
Method rowset = ResultSetWrappingSqlRowSet.class.getDeclaredMethod("getTime", String.class);
doTest(rset, rowset, "test", new Time(1234l));
doTest(rset, rowset, "test", new Time(1234L));
}
@Test