Class InputChoice

java.lang.Object
io.gatling.plugin.io.input.InputChoice

public final class InputChoice extends Object
  • Constructor Details

    • InputChoice

      public InputChoice(PluginIO pluginIO)
  • Method Details

    • inputInt

      public int inputInt(int inclusiveMin)
      Read a non negative number, inferior to max
      Parameters:
      inclusiveMin - inclusive minimum value of user entry
    • inputInt

      public int inputInt(int inclusiveMin, int exclusiveMax)
      Read a non negative number, inferior to max
      Parameters:
      inclusiveMin - inclusive minimum value of user entry
      exclusiveMax - exclusive maximum value of user entry
    • inputString

    • inputStringWithDefault

      public String inputStringWithDefault(String defaultValue, LambdaExceptionUtil.ConsumerWithExceptions<String,IllegalArgumentException> validator)
    • inputFromList

      public <T> T inputFromList(List<T> choices, Function<T,String> show) throws UserQuitException
      User must choose an input from the list
      Parameters:
      choices - possible results, must not be empty
      show - used to display a choice
      Throws:
      UserQuitException - if the user chooses to cancel the operation
    • inputFromList

      public <T> T inputFromList(List<T> choices, Function<T,String> show, Comparator<T> orderBy) throws UserQuitException
      User must choose an input from the list
      Parameters:
      choices - possible results, must not be empty
      show - used to display a choice
      orderBy - a comparator used for sorting the list of choices
      Throws:
      UserQuitException - if the user chooses to cancel the operation
    • inputFromStringList

      public String inputFromStringList(List<String> choices, boolean sorted) throws UserQuitException
      User must choose an input from the list
      Parameters:
      choices - possible results, must not be empty
      sorted - whether the list should be sorted or not
      Throws:
      UserQuitException - if the user chooses to cancel the operation