Class DefaultMethodOrdererContext
- java.lang.Object
-
- org.junit.jupiter.engine.discovery.DefaultMethodOrdererContext
-
- All Implemented Interfaces:
MethodOrdererContext
class DefaultMethodOrdererContext extends java.lang.Object implements MethodOrdererContext
Default implementation ofMethodOrdererContext
.- Since:
- 5.4
-
-
Field Summary
Fields Modifier and Type Field Description private JupiterConfiguration
configuration
private java.util.List<? extends MethodDescriptor>
methodDescriptors
private java.lang.Class<?>
testClass
-
Constructor Summary
Constructors Constructor Description DefaultMethodOrdererContext(java.lang.Class<?> testClass, java.util.List<? extends MethodDescriptor> methodDescriptors, JupiterConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.String>
getConfigurationParameter(java.lang.String key)
Get the configuration parameter stored under the specifiedkey
.java.util.List<? extends MethodDescriptor>
getMethodDescriptors()
Get the list of method descriptors to order.java.lang.Class<?>
getTestClass()
Get the test class for this context.java.lang.String
toString()
-
-
-
Field Detail
-
testClass
private final java.lang.Class<?> testClass
-
methodDescriptors
private final java.util.List<? extends MethodDescriptor> methodDescriptors
-
configuration
private final JupiterConfiguration configuration
-
-
Constructor Detail
-
DefaultMethodOrdererContext
DefaultMethodOrdererContext(java.lang.Class<?> testClass, java.util.List<? extends MethodDescriptor> methodDescriptors, JupiterConfiguration configuration)
-
-
Method Detail
-
getTestClass
public final java.lang.Class<?> getTestClass()
Description copied from interface:MethodOrdererContext
Get the test class for this context.- Specified by:
getTestClass
in interfaceMethodOrdererContext
- Returns:
- the test class; never
null
-
getMethodDescriptors
public java.util.List<? extends MethodDescriptor> getMethodDescriptors()
Description copied from interface:MethodOrdererContext
Get the list of method descriptors to order.- Specified by:
getMethodDescriptors
in interfaceMethodOrdererContext
- Returns:
- the list of method descriptors; never
null
-
getConfigurationParameter
public java.util.Optional<java.lang.String> getConfigurationParameter(java.lang.String key)
Description copied from interface:MethodOrdererContext
Get the configuration parameter stored under the specifiedkey
.If no such key is present in the
ConfigurationParameters
for the JUnit Platform, an attempt will be made to look up the value as a JVM system property. If no such system property exists, an attempt will be made to look up the value in the JUnit Platform properties file.- Specified by:
getConfigurationParameter
in interfaceMethodOrdererContext
- Parameters:
key
- the key to look up; nevernull
or blank- Returns:
- an
Optional
containing the value; nevernull
but potentially empty - See Also:
System.getProperty(String)
,ConfigurationParameters
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-