/** * Verifies that the changes were rolled back, i.e. the <code>rollback</code> * method of <code>Connection</code> was at least called once. * Makes only sense, if the <code>Connection</code> is not in * autocommit mode. * @throws VerifyFailedException if verification fails */ public void verifyRolledBack() { int number = mockFactory.getMockConnection().getNumberRollbacks(); if(number <= 0) { throw new VerifyFailedException("Connection received no rollbacks."); } }
/** * Verifies that the changes were not rolled back. * Makes only sense, if the <code>Connection</code> is not in * autocommit mode. * @throws VerifyFailedException if verification fails */ public void verifyNotRolledBack() { int number = mockFactory.getMockConnection().getNumberRollbacks(); if(number > 0) { throw new VerifyFailedException("Connection was rolled back."); } }
/** * Verifies that the changes were not rolled back. * Makes only sense, if the <code>Connection</code> is not in * autocommit mode. * @throws VerifyFailedException if verification fails */ public void verifyNotRolledBack() { int number = mockFactory.getMockConnection().getNumberRollbacks(); if(number > 0) { throw new VerifyFailedException("Connection was rolled back."); } }
/** * Verifies that the changes were not rolled back. * Makes only sense, if the <code>Connection</code> is not in * autocommit mode. * @throws VerifyFailedException if verification fails */ public void verifyNotRolledBack() { int number = mockFactory.getMockConnection().getNumberRollbacks(); if(number > 0) { throw new VerifyFailedException("Connection was rolled back."); } }
/** * Verifies that the changes were rolled back, i.e. the <code>rollback</code> * method of <code>Connection</code> was at least called once. * Makes only sense, if the <code>Connection</code> is not in * autocommit mode. * @throws VerifyFailedException if verification fails */ public void verifyRolledBack() { int number = mockFactory.getMockConnection().getNumberRollbacks(); if(number <= 0) { throw new VerifyFailedException("Connection received no rollbacks."); } }
/** * Verifies the number of <code>rollback</code> calls. * Makes only sense, if the <code>Connection</code> is not in * autocommit mode. * @param number the expected number of rollbacks * @throws VerifyFailedException if verification fails */ public void verifyNumberRollbacks(int number) { int actualNumber = mockFactory.getMockConnection().getNumberRollbacks(); if(actualNumber != number) { throw new VerifyFailedException("Connection received " + actualNumber + " rollbacks, expected " + number); } }
/** * Verifies that the changes were rolled back, i.e. the <code>rollback</code> * method of <code>Connection</code> was at least called once. * Makes only sense, if the <code>Connection</code> is not in * autocommit mode. * @throws VerifyFailedException if verification fails */ public void verifyRolledBack() { int number = mockFactory.getMockConnection().getNumberRollbacks(); if(number <= 0) { throw new VerifyFailedException("Connection received no rollbacks."); } }
/** * Verifies the number of <code>rollback</code> calls. * Makes only sense, if the <code>Connection</code> is not in * autocommit mode. * @param number the expected number of rollbacks * @throws VerifyFailedException if verification fails */ public void verifyNumberRollbacks(int number) { int actualNumber = mockFactory.getMockConnection().getNumberRollbacks(); if(actualNumber != number) { throw new VerifyFailedException("Connection received " + actualNumber + " rollbacks, expected " + number); } }
/** * Verifies the number of <code>rollback</code> calls. * Makes only sense, if the <code>Connection</code> is not in * autocommit mode. * @param number the expected number of rollbacks * @throws VerifyFailedException if verification fails */ public void verifyNumberRollbacks(int number) { int actualNumber = mockFactory.getMockConnection().getNumberRollbacks(); if(actualNumber != number) { throw new VerifyFailedException("Connection received " + actualNumber + " rollbacks, expected " + number); } }