Class CommonsMock.Param

java.lang.Object
com.helger.commons.mock.CommonsMock.Param
Enclosing class:
CommonsMock

@Immutable public static final class CommonsMock.Param extends Object
This class represents a parameter description for a single mockable type. It consists of a parameter name (purely informational), parameter class (required) and a generic supplier.
Author:
Philip Helger
  • Constructor Details

    • Param

      public Param(@Nonnull @Nonempty String sParamName, @Nonnull Class<T> aParamClass, @Nonnull Supplier<T> aDefaultValueSupplier)
      Constructor for a mock parameter
      Type Parameters:
      T - data type of the parameter
      Parameters:
      sParamName - Name of the parameter - informational only. May neither be null nor empty.
      aParamClass - The class of the parameter. May neither be null nor empty.
      aDefaultValueSupplier - The default value supplier in case the caller did not provide an argument. May not be null.
  • Method Details