Class ParameterNameAndArgument

java.lang.Object
org.junit.jupiter.params.support.ParameterNameAndArgument
All Implemented Interfaces:
Named<@Nullable Object>

@API(status=INTERNAL, since="6.0") public class ParameterNameAndArgument extends Object implements Named<@Nullable Object>
Customized parameter name and its associated argument value.

Although this class implements Named for technical reasons, it serves a different purpose than Named.of(String, Object) and is only used for internal display name processing.

Since:
6.0
  • Constructor Details

    • ParameterNameAndArgument

      public ParameterNameAndArgument(String name, @Nullable Object argument)
  • Method Details

    • getName

      public String getName()
      Get the customized name of the parameter.
      Specified by:
      getName in interface Named<@Nullable Object>
      Returns:
      the name of the payload; never null or blank
    • getPayload

      public @Nullable Object getPayload()
      Get the argument for the parameter.
      Specified by:
      getPayload in interface Named<@Nullable Object>
      Returns:
      the payload; may be null depending on the use case
    • toString

      public String toString()
      Overrides:
      toString in class Object