Interface URLAsGeneratorSpec

All Superinterfaces:
AsGeneratorSpec<URL>, GeneratorSpec<URL>, NullableGeneratorSpec<URL>, URLGeneratorSpec

public interface URLAsGeneratorSpec extends URLGeneratorSpec, AsGeneratorSpec<URL>
Generator spec for URL values that supports AsGeneratorSpec.
Since:
2.6.0
  • Method Details

    • protocol

      URLAsGeneratorSpec protocol(String... protocols)
      Description copied from interface: URLGeneratorSpec
      Generate a random protocol from the given choices. If not specified, the default is HTTP.
      Specified by:
      protocol in interface URLGeneratorSpec
      Parameters:
      protocols - one or more values from which a random protocol will be selected
      Returns:
      spec builder
    • port

      URLAsGeneratorSpec port(int port)
      Description copied from interface: URLGeneratorSpec
      Specifies the port number. If not specified, default port -1 will be used.
      Specified by:
      port in interface URLGeneratorSpec
      Parameters:
      port - port number to use
      Returns:
      spec builder
    • randomPort

      URLAsGeneratorSpec randomPort()
      Description copied from interface: URLGeneratorSpec
      Specifies that a random port number between 1 and 65535 (inclusive) should be generated.
      Specified by:
      randomPort in interface URLGeneratorSpec
      Returns:
      spec builder
    • host

      URLAsGeneratorSpec host(Generator<String> hostGenerator)
      Description copied from interface: URLGeneratorSpec
      Specifies a generator for the host name. If not specified, a random host name will be generated.
      Specified by:
      host in interface URLGeneratorSpec
      Parameters:
      hostGenerator - generator for the host name
      Returns:
      spec builder
    • file

      URLAsGeneratorSpec file(Generator<String> fileGenerator)
      Description copied from interface: URLGeneratorSpec
      Specifies a generator for the file name. If not specified, blank file name will be used.
      Specified by:
      file in interface URLGeneratorSpec
      Parameters:
      fileGenerator - generator for the file
      Returns:
      spec builder