Arbitrary.ArbitraryFacade
Modifier and Type | Method and Description |
---|---|
StringArbitrary |
all()
Allow all unicode chars even noncharacters and private use characters
but only in plane 0 (aka Basic Multilingual Plane)
|
StringArbitrary |
alpha()
Allow all alpha chars to show up in generated strings.
|
StringArbitrary |
ascii()
Allow all ascii chars to show up in generated strings.
|
StringArbitrary |
numeric()
Allow all numeric chars (digits) to show up in generated strings.
|
default StringArbitrary |
ofLength(int length)
Fix the length to
length of generated strings. |
StringArbitrary |
ofMaxLength(int maxLength)
Set the maximum allowed length
maxLength (included) of generated strings. |
StringArbitrary |
ofMinLength(int minLength)
Set the minimum allowed length
mixLength (included) of generated strings. |
StringArbitrary |
whitespace()
Allow all chars that will return
true for
Character.isWhitespace(char) . |
StringArbitrary |
withCharRange(char from,
char to)
Allow all chars within
from (included) and to (included) to show up in generated strings. |
StringArbitrary |
withChars(char... chars)
Allow all chars in
chars to show up in generated strings. |
allValues, array, exhaustive, filter, fixGenSize, flatMap, forEachValue, generator, injectNull, iterator, list, map, optional, set, stream, unique, withSamples
StringArbitrary ofMaxLength(int maxLength)
maxLength
(included) of generated strings.StringArbitrary ofMinLength(int minLength)
mixLength
(included) of generated strings.default StringArbitrary ofLength(int length)
length
of generated strings.StringArbitrary withChars(char... chars)
chars
to show up in generated strings.
Can be combined with other methods that allow chars.StringArbitrary withCharRange(char from, char to)
from
(included) and to
(included) to show up in generated strings.
Can be combined with other methods that allow chars.StringArbitrary ascii()
StringArbitrary alpha()
StringArbitrary numeric()
StringArbitrary whitespace()
true
for
Character.isWhitespace(char)
.
Can be combined with other methods that allow chars.StringArbitrary all()