Package io.micronaut.test.annotation
Enum Class TransactionMode
- All Implemented Interfaces:
Serializable
,Comparable<TransactionMode>
,Constable
Describes how transactions are handled for each test.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionEach setup/cleanup method is wrapped in its own transaction, separate from that of the test.All setup methods are wrapped in the same transaction as the test. -
Method Summary
Modifier and TypeMethodDescriptionstatic TransactionMode
Returns the enum constant of this class with the specified name.static TransactionMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
All setup methods are wrapped in the same transaction as the test. Cleanup methods are wrapped in separate transactions.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-