Interface URIGeneratorSpec

All Superinterfaces:
GeneratorSpec<URI>, NullableGeneratorSpec<URI>
All Known Subinterfaces:
URIAsGeneratorSpec, URISpec

public interface URIGeneratorSpec extends NullableGeneratorSpec<URI>
Generator spec for URI.
Since:
2.3.0
  • Method Details

    • scheme

      URIGeneratorSpec scheme(String... schemes)
      Generate a random scheme from the given choices. If not specified, the default is HTTP.
      Parameters:
      schemes - one or more values from which a random scheme will be selected
      Returns:
      spec builder
      Since:
      2.3.0
    • userInfo

      URIGeneratorSpec userInfo(String userInfo)
      Specifies username. If not specified, a null user will be generated.
      Parameters:
      userInfo - username to generate
      Returns:
      spec builder
      Since:
      2.3.0
    • host

      URIGeneratorSpec host(Generator<String> hostGenerator)
      Specifies a generator for the host name. If not specified, a random host name will be generated.
      Parameters:
      hostGenerator - generator for the host name
      Returns:
      spec builder
      Since:
      2.3.0
    • port

      URIGeneratorSpec port(int port)
      Specifies the port number. If not specified, default port -1 will be used.
      Parameters:
      port - port number to use
      Returns:
      spec builder
      Since:
      2.3.0
    • randomPort

      URIGeneratorSpec randomPort()
      Specifies that a random port number between 1 and 65535 (inclusive) should be generated.
      Returns:
      spec builder
      Since:
      2.3.0
    • path

      URIGeneratorSpec path(Generator<String> pathGenerator)
      Specifies a generator for the path. If not specified, null path will be generated.
      Parameters:
      pathGenerator - generator for the path
      Returns:
      spec builder
      Since:
      2.3.0
    • query

      URIGeneratorSpec query(Generator<String> queryGenerator)
      Specifies a generator for the query. If not specified, null query will be generated.
      Parameters:
      queryGenerator - generator for the query
      Returns:
      spec builder
      Since:
      2.3.0
    • fragment

      URIGeneratorSpec fragment(Generator<String> fragmentGenerator)
      Specifies a generator for the fragmentGenerator. If not specified, null fragmentGenerator will be generated.
      Parameters:
      fragmentGenerator - generator for the fragment
      Returns:
      spec builder
      Since:
      2.3.0
    • nullable

      URIGeneratorSpec nullable()
      Indicates that null value can be generated.
      Specified by:
      nullable in interface NullableGeneratorSpec<URI>
      Returns:
      spec builder
      Since:
      3.2.0