public interface RandomStringProvider extends RandomDataProvider<String>
Provides random strings, typically of some minimum and maximum length and with specified types of characters contained.
| Modifier and Type | Method and Description |
|---|---|
RandomStringProvider |
length(int len)
Specify the exact length of the strings to return.
|
RandomStringProvider |
maxLength(int len)
Specify the maximum length of the strings to return.
|
RandomStringProvider |
minLength(int len)
Specify the minimum length of the strings to return.
|
RandomStringProvider |
postfix(String postfix)
Specify a postfix to attach to the random string.
|
RandomStringProvider |
prefix(String prefix)
Specify a prefix to put in front of the random string.
|
RandomStringProvider |
type(RandomStringType type)
Specify the type of characters to create.
|
fixateget@Nonnull RandomStringProvider length(@Nonnegative int len)
Specify the exact length of the strings to return. Sets maximum and minimum length to the same value.
len - the length of the strings to create@Nonnull RandomStringProvider maxLength(@Nonnegative int len)
Specify the maximum length of the strings to return.
len - maximum length of strings@Nonnull RandomStringProvider minLength(@Nonnegative int len)
Specify the minimum length of the strings to return.
len - minimum length of strings@Nonnull RandomStringProvider type(@Nonnull RandomStringType type)
Specify the type of characters to create.
type - character type@Nonnull RandomStringProvider prefix(@Nullable String prefix)
Specify a prefix to put in front of the random string. This is sometimes useful in order to assist assertions to be easy to interpret. The prefix length is subtracted from the total valid length of the generated string. So it must not exceed the maximum length.
prefix - prefix for the string; null or empty string for no prefix@Nonnull RandomStringProvider postfix(@Nullable String postfix)
Specify a postfix to attach to the random string. This is sometimes useful in order to assist assertions to be easy to interpret. The postfix length is subtracted from the total valid length of the generated string. So it must not exceed the maximum length.
postfix - postfix for the string; null or empty string for no postfixCopyright © 2011-2013 CoreMedia AG. All Rights Reserved.