Adding a test and adding a missed annotation.
@@ -144,6 +144,7 @@ public class ColumnsTest {
assertThat(actual).isEqualTo(expected);
}
+ @Test
public void testStringOrThrow_string() throws SQLException {
final String column = "with_string";
final String expected = "string";
@@ -154,6 +155,17 @@ public class ColumnsTest {
assertThat(actual).isEqualTo(expected);
}
+ @Test
+ public void testIntOrThrow_int() throws SQLException {
+ final String column = "count";
+ final int expected = 1;
+ when(results.getObject(column)).thenReturn(expected);
+ when(results.getInt(column)).thenReturn(expected);
+
+ final int actual = Columns.intOrThrow(results, column);
+ assertThat(actual).isEqualTo(expected);
+ }
+
@Test
public void testStringOrThrow_throw() throws SQLException {
final String column = "with_null_string";
