Annotation Interface EmptySource


@Target({ANNOTATION_TYPE,METHOD,TYPE}) @Retention(RUNTIME) @Documented @Inherited @API(status=STABLE, since="5.7") @ArgumentsSource(org.junit.jupiter.params.provider.EmptyArgumentsProvider.class) public @interface EmptySource
@EmptySource is an ArgumentsSource which provides a single empty argument to the annotated @ParameterizedClass or @ParameterizedTest.

Supported Parameter Types

This argument source will only provide an empty argument for the following parameter types.

Unless the type() is set, the parameter type is derived from the first (and only) parameter of the annotated @ParameterizedClass or @ParameterizedTest.

Inheritance

This annotation is inherited within class hierarchies.

Since:
5.4
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The type of the empty argument to provide.
  • Element Details

    • type

      The type of the empty argument to provide.

      Must be one of the supported parameter types.

      Setting this attribute is usually not necessary because the type will be derived from the first (and only) parameter. Setting it explicitly allows using an ArgumentConverter to convert from the specified type to the actual parameter type.

      Default:
      org.junit.jupiter.params.provider.EmptyArgumentsProvider.Derived.class