예제 #1
0
 @Test
 public void shouldRollbackTransactionWhenRollbackOnOpenConnectionGiven() throws SQLException {
   sqlBuilder.rollback();
   verify(connectionMock, times(1)).rollback();
 }
예제 #2
0
 @Test(expected = IllegalStateException.class)
 public void shouldThrowExceptionWhenRollbackOnAlreadyClosedBuilderGiven() throws SQLException {
   sqlBuilder.close();
   sqlBuilder.rollback();
 }