Skip to content

Commit

Permalink
Use classes in assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dprzybysz committed Mar 15, 2024
1 parent b7ab263 commit 26cc2d3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/test/java/net/snowflake/client/jdbc/ResultSetLatestIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -983,19 +983,19 @@ public void testLargeStringRetrieval() throws SQLException {
private static void assertAllColumnsAreLongButBigIntIsBigDecimal(ResultSet rs)
throws SQLException {
while (rs.next()) {
assertEquals("class java.lang.Long", rs.getObject(1).getClass().toString());
assertEquals("class java.math.BigDecimal", rs.getObject(2).getClass().toString());
assertEquals("class java.lang.Long", rs.getObject(3).getClass().toString());
assertEquals("class java.lang.Long", rs.getObject(4).getClass().toString());
assertEquals(java.lang.Long.class, rs.getObject(1).getClass());
assertEquals(java.math.BigDecimal.class, rs.getObject(2).getClass());
assertEquals(java.lang.Long.class, rs.getObject(3).getClass());
assertEquals(java.lang.Long.class, rs.getObject(4).getClass());
}
}

private static void assertAllColumnsAreBigDecimal(ResultSet rs) throws SQLException {
while (rs.next()) {
assertEquals("class java.math.BigDecimal", rs.getObject(1).getClass().toString());
assertEquals("class java.math.BigDecimal", rs.getObject(2).getClass().toString());
assertEquals("class java.math.BigDecimal", rs.getObject(3).getClass().toString());
assertEquals("class java.math.BigDecimal", rs.getObject(4).getClass().toString());
assertEquals(java.math.BigDecimal.class, rs.getObject(1).getClass());
assertEquals(java.math.BigDecimal.class, rs.getObject(2).getClass());
assertEquals(java.math.BigDecimal.class, rs.getObject(3).getClass());
assertEquals(java.math.BigDecimal.class, rs.getObject(4).getClass());
}
}

Expand Down

0 comments on commit 26cc2d3

Please sign in to comment.