Interface URISpec

All Superinterfaces:
GeneratorSpec<URI>, NullableGeneratorSpec<URI>, URIGeneratorSpec, ValueSpec<URI>

public interface URISpec extends ValueSpec<URI>, URIGeneratorSpec
Spec for generating URI values.
Since:
2.6.0
  • Method Details

    • scheme

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

      URISpec userInfo(String userInfo)
      Description copied from interface: URIGeneratorSpec
      Specifies username. If not specified, a null user will be generated.
      Specified by:
      userInfo in interface URIGeneratorSpec
      Parameters:
      userInfo - username to generate
      Returns:
      spec builder
    • host

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

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

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

      URISpec path(Generator<String> pathGenerator)
      Description copied from interface: URIGeneratorSpec
      Specifies a generator for the path. If not specified, null path will be generated.
      Specified by:
      path in interface URIGeneratorSpec
      Parameters:
      pathGenerator - generator for the path
      Returns:
      spec builder
    • query

      URISpec query(Generator<String> queryGenerator)
      Description copied from interface: URIGeneratorSpec
      Specifies a generator for the query. If not specified, null query will be generated.
      Specified by:
      query in interface URIGeneratorSpec
      Parameters:
      queryGenerator - generator for the query
      Returns:
      spec builder
    • fragment

      URISpec fragment(Generator<String> fragmentGenerator)
      Description copied from interface: URIGeneratorSpec
      Specifies a generator for the fragmentGenerator. If not specified, null fragmentGenerator will be generated.
      Specified by:
      fragment in interface URIGeneratorSpec
      Parameters:
      fragmentGenerator - generator for the fragment
      Returns:
      spec builder
    • nullable

      URISpec nullable()
      Description copied from interface: ValueSpec
      Specifies that a null value can be generated
      Specified by:
      nullable in interface NullableGeneratorSpec<URI>
      Specified by:
      nullable in interface URIGeneratorSpec
      Specified by:
      nullable in interface ValueSpec<URI>
      Returns:
      spec builder reference