Package org.junit.jupiter.api
Class MethodOrderer.MethodName
- java.lang.Object
-
- org.junit.jupiter.api.MethodOrderer.MethodName
-
- All Implemented Interfaces:
MethodOrderer
- Direct Known Subclasses:
MethodOrderer.Alphanumeric
- Enclosing interface:
- MethodOrderer
@API(status=EXPERIMENTAL, since="5.7") public static class MethodOrderer.MethodName extends java.lang.Object implements MethodOrdererMethodOrdererthat sorts methods alphanumerically based on their names usingString.compareTo(String).If two methods have the same name,
Stringrepresentations of their formal parameter lists will be used as a fallback for comparing the methods.- Since:
- 5.7
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.junit.jupiter.api.MethodOrderer
MethodOrderer.Alphanumeric, MethodOrderer.DisplayName, MethodOrderer.MethodName, MethodOrderer.OrderAnnotation, MethodOrderer.Random
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Comparator<MethodDescriptor>comparator
-
Constructor Summary
Constructors Constructor Description MethodName()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidorderMethods(MethodOrdererContext context)Sort the methods encapsulated in the suppliedMethodOrdererContextalphanumerically based on their names and formal parameter lists.private static java.lang.StringparameterList(java.lang.reflect.Method method)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.junit.jupiter.api.MethodOrderer
getDefaultExecutionMode
-
-
-
-
Field Detail
-
comparator
private static final java.util.Comparator<MethodDescriptor> comparator
-
-
Method Detail
-
orderMethods
public void orderMethods(MethodOrdererContext context)
Sort the methods encapsulated in the suppliedMethodOrdererContextalphanumerically based on their names and formal parameter lists.- Specified by:
orderMethodsin interfaceMethodOrderer- Parameters:
context- theMethodOrdererContextcontaining themethod descriptorsto order; nevernull- See Also:
MethodOrderer.getDefaultExecutionMode()
-
parameterList
private static java.lang.String parameterList(java.lang.reflect.Method method)
-
-