- java.lang.Object
-
- org.junit.jupiter.api.ClassOrderer.OrderAnnotation
-
- All Implemented Interfaces:
ClassOrderer
- Enclosing interface:
- ClassOrderer
public static class ClassOrderer.OrderAnnotation extends java.lang.Object implements ClassOrderer
ClassOrderer
that sorts classes based on the@Order
annotation.Any classes that are assigned the same order value will be sorted arbitrarily adjacent to each other.
Any classes 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 classes are assigned an explicit order value greater than the default order value. Any classes assigned an explicit order value greater than the default order value will appear after non-annotated classes in the sorted list.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.junit.jupiter.api.ClassOrderer
ClassOrderer.ClassName, ClassOrderer.DisplayName, ClassOrderer.OrderAnnotation, ClassOrderer.Random
-
-
Field Summary
-
Fields inherited from interface org.junit.jupiter.api.ClassOrderer
DEFAULT_ORDER_PROPERTY_NAME
-
-
Constructor Summary
Constructors Constructor Description OrderAnnotation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static int
getOrder(ClassDescriptor descriptor)
void
orderClasses(ClassOrdererContext context)
Sort the classes encapsulated in the suppliedClassOrdererContext
based on the@Order
annotation.
-
-
-
Method Detail
-
orderClasses
public void orderClasses(ClassOrdererContext context)
Sort the classes encapsulated in the suppliedClassOrdererContext
based on the@Order
annotation.- Specified by:
orderClasses
in interfaceClassOrderer
- Parameters:
context
- theClassOrdererContext
containing the class descriptors to order; nevernull
-
getOrder
private static int getOrder(ClassDescriptor descriptor)
-
-