/** * Start a new test-managed transaction. * <p>Only call this method if {@link #end} has been called or if no * transaction has been previously started. * @throws IllegalStateException if the transaction context could not be * retrieved or if a transaction is already active for the current test * @see #isActive() * @see #end() */ public static void start() { requireCurrentTransactionContext().startTransaction(); }
/** * Immediately force a <em>commit</em> or <em>rollback</em> of the * current test-managed transaction, according to the * {@linkplain #isFlaggedForRollback rollback flag}. * @throws IllegalStateException if the transaction context could not be * retrieved or if a transaction is not active for the current test * @see #isActive() * @see #start() */ public static void end() { requireCurrentTransactionContext().endTransaction(); }
private static void setFlaggedForRollback(boolean flag) { requireCurrentTransactionContext().setFlaggedForRollback(flag); }
/** * Determine whether the current test-managed transaction has been * {@linkplain #flagForRollback() flagged for rollback} or * {@linkplain #flagForCommit() flagged for commit}. * @return {@code true} if the current test-managed transaction is flagged * to be rolled back; {@code false} if the current test-managed transaction * is flagged to be committed * @throws IllegalStateException if a transaction is not active for the * current test * @see #isActive() * @see #flagForRollback() * @see #flagForCommit() */ public static boolean isFlaggedForRollback() { return requireCurrentTransactionContext().isFlaggedForRollback(); }
/** * Immediately force a <em>commit</em> or <em>rollback</em> of the * current test-managed transaction, according to the * {@linkplain #isFlaggedForRollback rollback flag}. * @throws IllegalStateException if the transaction context could not be * retrieved or if a transaction is not active for the current test * @see #isActive() * @see #start() */ public static void end() { requireCurrentTransactionContext().endTransaction(); }
/** * Start a new test-managed transaction. * <p>Only call this method if {@link #end} has been called or if no * transaction has been previously started. * @throws IllegalStateException if the transaction context could not be * retrieved or if a transaction is already active for the current test * @see #isActive() * @see #end() */ public static void start() { requireCurrentTransactionContext().startTransaction(); }
/** * Start a new test-managed transaction. * <p>Only call this method if {@link #end} has been called or if no * transaction has been previously started. * @throws IllegalStateException if the transaction context could not be * retrieved or if a transaction is already active for the current test * @see #isActive() * @see #end() */ public static void start() { requireCurrentTransactionContext().startTransaction(); }
/** * Immediately force a <em>commit</em> or <em>rollback</em> of the * current test-managed transaction, according to the * {@linkplain #isFlaggedForRollback rollback flag}. * @throws IllegalStateException if the transaction context could not be * retrieved or if a transaction is not active for the current test * @see #isActive() * @see #start() */ public static void end() { requireCurrentTransactionContext().endTransaction(); }
private static void setFlaggedForRollback(boolean flag) { requireCurrentTransactionContext().setFlaggedForRollback(flag); }
private static void setFlaggedForRollback(boolean flag) { requireCurrentTransactionContext().setFlaggedForRollback(flag); }
/** * Determine whether the current test-managed transaction has been * {@linkplain #flagForRollback() flagged for rollback} or * {@linkplain #flagForCommit() flagged for commit}. * @return {@code true} if the current test-managed transaction is flagged * to be rolled back; {@code false} if the current test-managed transaction * is flagged to be committed * @throws IllegalStateException if a transaction is not active for the * current test * @see #isActive() * @see #flagForRollback() * @see #flagForCommit() */ public static boolean isFlaggedForRollback() { return requireCurrentTransactionContext().isFlaggedForRollback(); }
/** * Determine whether the current test-managed transaction has been * {@linkplain #flagForRollback() flagged for rollback} or * {@linkplain #flagForCommit() flagged for commit}. * @return {@code true} if the current test-managed transaction is flagged * to be rolled back; {@code false} if the current test-managed transaction * is flagged to be committed * @throws IllegalStateException if a transaction is not active for the * current test * @see #isActive() * @see #flagForRollback() * @see #flagForCommit() */ public static boolean isFlaggedForRollback() { return requireCurrentTransactionContext().isFlaggedForRollback(); }