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