Package org.junit.jupiter.api
Annotation Type Order
-
@Target({FIELD,METHOD,TYPE}) @Retention(RUNTIME) @Documented @API(status=STABLE, since="5.9") public @interface Order@Orderis an annotation that is used to configure the order in which the annotated element (i.e., field, method, or class) should be evaluated or executed relative to other elements of the same category.When used with
@RegisterExtensionor@ExtendWith, the category applies to extension fields. When used withMethodOrderer.OrderAnnotation, the category applies to test methods. When used withClassOrderer.OrderAnnotation, the category applies to test classes.If
@Orderis not explicitly declared on an element, theDEFAULTorder value will be assigned to the element.- Since:
- 5.4
- See Also:
MethodOrderer.OrderAnnotation,ClassOrderer.OrderAnnotation,@RegisterExtension,@ExtendWith
-
-
Field Summary
Fields Modifier and Type Fields Description static intDEFAULTDefault order value for elements not explicitly annotated with@Order, equal to the value ofInteger.MAX_VALUE / 2.
-
Required Element Summary
Required Elements Modifier and Type Required Element Description intvalueThe order value for the annotated element (i.e., field, method, or class).
-
-
-
Field Detail
-
DEFAULT
static final int DEFAULT
Default order value for elements not explicitly annotated with@Order, equal to the value ofInteger.MAX_VALUE / 2.- Since:
- 5.6
- See Also:
value()
-
-
Element Detail
-
value
int value
The order value for the annotated element (i.e., field, method, or class).Elements are ordered based on priority where a lower value has greater priority than a higher value. For example,
Integer.MAX_VALUEhas the lowest priority.- See Also:
DEFAULT
-
-