Package io.github.cdiunit
Annotation Type Isolation
Defines the isolation level for a test case.
Per default, each test method is executed in a separate Weld instance, which guarantees total isolation; however, this also means that multiple instances exist for application-scoped beans (one per test method), which can be a problem in some cases.
When a test class is annotated with @Isolation(IsolationLevel.PER_CLASS)
, all test methods are executed
in the same Weld instance. Each test method will still run in a separate instance of the test class itself, but
any injected application-scoped beans will be shared among the test methods.
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
IsolationLevel value- Default:
- PER_METHOD
-