Enum Class TransactionMode

java.lang.Object
java.lang.Enum<TransactionMode>
io.micronaut.test.annotation.TransactionMode
All Implemented Interfaces:
Serializable, Comparable<TransactionMode>, Constable

public enum TransactionMode extends Enum<TransactionMode>
Describes how transactions are handled for each test.
  • Enum Constant Details

    • SEPARATE_TRANSACTIONS

      public static final TransactionMode SEPARATE_TRANSACTIONS
      Each setup/cleanup method is wrapped in its own transaction, separate from that of the test. This transaction is always committed.
    • SINGLE_TRANSACTION

      public static final TransactionMode SINGLE_TRANSACTION
      All setup methods are wrapped in the same transaction as the test. Cleanup methods are wrapped in separate transactions.
  • Method Details

    • values

      public static TransactionMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TransactionMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null