Package org.junit.jupiter.api
Class MethodOrderer.OrderAnnotation
java.lang.Object
org.junit.jupiter.api.MethodOrderer.OrderAnnotation
- All Implemented Interfaces:
MethodOrderer
- Enclosing interface:
MethodOrderer
MethodOrderer that sorts methods based on the @Order
annotation.
Any methods that are assigned the same order value will be sorted arbitrarily adjacent to each other.
Any methods not annotated with @Order will be assigned the
default order value which will
effectively cause them to appear at the end of the sorted list, unless
certain methods are assigned an explicit order value greater than the default
order value. Any methods assigned an explicit order value greater than the
default order value will appear after non-annotated methods in the sorted
list.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.junit.jupiter.api.MethodOrderer
MethodOrderer.Alphanumeric, MethodOrderer.DisplayName, MethodOrderer.MethodName, MethodOrderer.OrderAnnotation, MethodOrderer.Random -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intgetOrder(MethodDescriptor descriptor) voidorderMethods(MethodOrdererContext context) Sort the methods encapsulated in the suppliedMethodOrdererContextbased on the@Orderannotation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.junit.jupiter.api.MethodOrderer
getDefaultExecutionMode
-
Constructor Details
-
OrderAnnotation
public OrderAnnotation()
-
-
Method Details
-
orderMethods
Sort the methods encapsulated in the suppliedMethodOrdererContextbased on the@Orderannotation.- Specified by:
orderMethodsin interfaceMethodOrderer- Parameters:
context- theMethodOrdererContextcontaining themethod descriptorsto order; nevernull- See Also:
-
getOrder
-