Ejemplo n.º 1
0
 @Test(expected = IllegalStateException.class)
 public void shouldThrowExceptionWhenResultOnClosedStatementGiven() throws SQLException {
   sqlBuilder.prepareStatement("select 1 from dual");
   sqlBuilder.close();
   sqlBuilder.resultSet();
 }
Ejemplo n.º 2
0
 @Test
 public void shouldReturnResultSetWhenResultSetOnOpenStatementGiven() throws SQLException {
   sqlBuilder.prepareStatement("select 1 from dual");
   sqlBuilder.resultSet();
   verify(preparedStatementMock, times(1)).executeQuery();
 }
Ejemplo n.º 3
0
 @Test(expected = IllegalStateException.class)
 public void shouldThrowExceptionWhenResultWithoutStatementGiven() throws SQLException {
   sqlBuilder.resultSet();
 }