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