Package org.instancio.generator.specs
Interface URISpec
- All Superinterfaces:
GeneratorSpec<URI>,NullableGeneratorSpec<URI>,URIGeneratorSpec,ValueSpec<URI>
Spec for generating
URI values.- Since:
- 2.6.0
-
Method Summary
Modifier and TypeMethodDescriptionSpecifies a generator for the fragmentGenerator.Specifies a generator for the host name.nullable()Specifies that anullvalue can be generatedSpecifies a generator for the path.port(int port) Specifies the port number.Specifies a generator for the query.Specifies that a random port number between 1 and 65535 (inclusive) should be generated.Generate a random scheme from the given choices.Specifies username.
-
Method Details
-
scheme
Description copied from interface:URIGeneratorSpecGenerate a random scheme from the given choices. If not specified, the default is HTTP.- Specified by:
schemein interfaceURIGeneratorSpec- Parameters:
schemes- one or more values from which a random scheme will be selected- Returns:
- spec builder
-
userInfo
Description copied from interface:URIGeneratorSpecSpecifies username. If not specified, anulluser will be generated.- Specified by:
userInfoin interfaceURIGeneratorSpec- Parameters:
userInfo- username to generate- Returns:
- spec builder
-
host
Description copied from interface:URIGeneratorSpecSpecifies a generator for the host name. If not specified, a random host name will be generated.- Specified by:
hostin interfaceURIGeneratorSpec- Parameters:
hostGenerator- generator for the host name- Returns:
- spec builder
-
port
Description copied from interface:URIGeneratorSpecSpecifies the port number. If not specified, default port-1will be used.- Specified by:
portin interfaceURIGeneratorSpec- Parameters:
port- port number to use- Returns:
- spec builder
-
randomPort
URISpec randomPort()Description copied from interface:URIGeneratorSpecSpecifies that a random port number between 1 and 65535 (inclusive) should be generated.- Specified by:
randomPortin interfaceURIGeneratorSpec- Returns:
- spec builder
-
path
Description copied from interface:URIGeneratorSpecSpecifies a generator for the path. If not specified,nullpath will be generated.- Specified by:
pathin interfaceURIGeneratorSpec- Parameters:
pathGenerator- generator for the path- Returns:
- spec builder
-
query
Description copied from interface:URIGeneratorSpecSpecifies a generator for the query. If not specified,nullquery will be generated.- Specified by:
queryin interfaceURIGeneratorSpec- Parameters:
queryGenerator- generator for the query- Returns:
- spec builder
-
fragment
Description copied from interface:URIGeneratorSpecSpecifies a generator for the fragmentGenerator. If not specified,nullfragmentGenerator will be generated.- Specified by:
fragmentin interfaceURIGeneratorSpec- Parameters:
fragmentGenerator- generator for the fragment- Returns:
- spec builder
-
nullable
URISpec nullable()Description copied from interface:ValueSpecSpecifies that anullvalue can be generated- Specified by:
nullablein interfaceNullableGeneratorSpec<URI>- Specified by:
nullablein interfaceURIGeneratorSpec- Specified by:
nullablein interfaceValueSpec<URI>- Returns:
- spec builder reference
-