Class DefaultAsProvider

java.lang.Object
com.tngtech.jgiven.impl.params.DefaultAsProvider
All Implemented Interfaces:
AsProvider

public class DefaultAsProvider extends Object implements AsProvider
The default provider for a stage method, scenario or scenario class.
Since:
0.12.0
  • Constructor Details

    • DefaultAsProvider

      public DefaultAsProvider()
  • Method Details

    • as

      public String as(As annotation, Method method)
      Returns the value of the As annotation if a value was specified. Otherwise, this transforms the method name into a readable sentence and returns it.
      Specified by:
      as in interface AsProvider
      Parameters:
      annotation - The As annotation using this provider.
      method - The method of which a representation is requested.
      Returns:
      A representation of the method.
    • as

      public String as(As annotation, Class<?> scenarioClass)
      Returns the value of the As annotation. Otherwise, this transforms the class name into a readable sentence and returns it.
      Specified by:
      as in interface AsProvider
      Parameters:
      annotation - The As annotation using this provider.
      scenarioClass - The scenario class of which a representation is requested.
      Returns:
      A representation of the scenario class.