Package org.junit.jupiter.api
Annotation Type Nested
-
@Target(TYPE) @Retention(RUNTIME) @Documented @API(status=STABLE, since="5.0") public @interface Nested@Nestedis used to signal that the annotated class is a nested, non-static test class (i.e., an inner class) that can share setup and state with an instance of its enclosing class. The enclosing class may be a top-level test class or another@Nestedtest class, and nesting can be arbitrarily deep.Test Instance Lifecycle
- A
@Nestedtest class can be configured with its ownTestInstance.Lifecyclemode which may differ from that of an enclosing test class. - A
@Nestedtest class cannot change theTestInstance.Lifecyclemode of an enclosing test class.
- Since:
- 5.0
- See Also:
Test,TestInstance
- A