Package org.junit.jupiter.api
Interface NamedExecutable
-
- All Superinterfaces:
Executable,Named<Executable>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface @API(status=MAINTAINED, since="5.13.3") public interface NamedExecutable extends Named<Executable>, ExecutableNamedExecutablejoinsExecutableandNamedin a one self-typed functional interface.The default implementation of
getName()returns the result of callingObject.toString()on the implementing instance but may be overridden by concrete implementations to provide a more meaningful name.On Java 16 or later, it is recommended to implement this interface using a record type.
- Since:
- 5.11
- See Also:
DynamicTest.stream(Stream),DynamicTest.stream(Iterator)
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.lang.StringgetName()Get the name of the payload.default ExecutablegetPayload()Get the payload.-
Methods inherited from interface org.junit.jupiter.api.function.Executable
execute
-
-
-
-
Method Detail
-
getName
default java.lang.String getName()
Description copied from interface:NamedGet the name of the payload.- Specified by:
getNamein interfaceNamed<Executable>- Returns:
- the name of the payload; never
nullor blank
-
getPayload
default Executable getPayload()
Description copied from interface:NamedGet the payload.- Specified by:
getPayloadin interfaceNamed<Executable>- Returns:
- the payload; may be
nulldepending on the use case
-
-