Class NoStepDefinition

java.lang.Object
io.cucumber.core.runner.NoStepDefinition
All Implemented Interfaces:
Located, StepDefinition

final class NoStepDefinition extends Object implements StepDefinition
  • Constructor Details

    • NoStepDefinition

      NoStepDefinition()
  • Method Details

    • execute

      public void execute(Object[] args)
      Description copied from interface: StepDefinition
      Invokes the step definition. The method should raise a Throwable if the invocation fails, which will cause the step to fail.
      Specified by:
      execute in interface StepDefinition
      Parameters:
      args - The arguments for the step
    • parameterInfos

      public List<ParameterInfo> parameterInfos()
      Description copied from interface: StepDefinition
      Return parameter information.
      Specified by:
      parameterInfos in interface StepDefinition
      Returns:
      parameter information, may not return null
    • getPattern

      public String getPattern()
      Description copied from interface: StepDefinition
      Return the pattern associated with this instance. Used for error reporting only.
      Specified by:
      getPattern in interface StepDefinition
      Returns:
      the pattern associated with this instance.
    • isDefinedAt

      public boolean isDefinedAt(StackTraceElement stackTraceElement)
      Description copied from interface: Located
      Return true if this matches the location. This is used to filter stack traces.
      Specified by:
      isDefinedAt in interface Located
      Parameters:
      stackTraceElement - The location of the step.
      Returns:
      Return true if this matches the location.
    • getLocation

      public String getLocation()
      Description copied from interface: Located
      Location of step definition. Can either be a a method or stack trace style location.

      Examples:

      • com.example.StepDefinitions.given_an_example(io.cucumber.datatable.DataTable)
      • com.example.StepDefinitions.<init>(StepDefinitions.java:9)
      Specified by:
      getLocation in interface Located
      Returns:
      The source line of the step definition.