Base class for DSL matcher methods
| Type | Name and description |
|---|---|
static long |
DATE_2000 |
static java.lang.String |
DECIMAL |
static java.lang.String |
HEXADECIMAL |
static java.lang.String |
INTEGER |
static java.lang.String |
IP_ADDRESS |
static int |
TEN |
static java.lang.String |
TYPE |
static java.lang.String |
UUID_REGEX |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static java.lang.Object |
and(java.lang.Object example, java.lang.Object... values)Matches if all of the provided matches match |
|
static java.lang.Object |
bool(java.lang.Boolean value = null)Match any boolean |
|
static java.lang.Object |
date(java.lang.String pattern = null, java.lang.Object value = null)Match a date |
|
static java.lang.Object |
dateExpression(java.lang.String expression, java.lang.String pattern = null)Match a date generated from an expression |
|
static java.lang.Object |
decimal(java.lang.Number value = null)Match a decimal value |
|
static java.lang.Object |
eachArrayLike(java.lang.Integer numberExamples = 1, java.lang.Object arg)Array of arrays where each element like the following object |
|
static java.lang.Object |
eachLike(java.lang.Integer numberExamples = 1, java.lang.Object arg)Array where each element like the following object |
|
static java.lang.Object |
equalTo(java.lang.Object value)Match Equality |
|
static java.lang.Object |
guid(java.lang.String value = null)Match a globally unique ID (GUID) |
|
static java.lang.Object |
hexValue(java.lang.String value = null)Match a hexadecimal value |
|
static java.lang.Object |
identifier(java.lang.Object value = null)Match a numeric identifier (integer) |
|
static java.lang.Object |
includesStr(java.lang.Object value)Matches if the string is included in the value |
|
static java.lang.Object |
integer(java.lang.Long value = null)Match a integer value |
|
static java.lang.Object |
ipAddress(java.lang.String value = null)Match an IP Address |
|
static java.lang.Object |
maxLike(java.lang.Integer max, java.lang.Integer numberExamples = 1, java.lang.Object arg)Array with maximum size and each element like the following object |
|
static java.lang.Object |
minLike(java.lang.Integer min, java.lang.Integer numberExamples = 1, java.lang.Object arg)Array with minimum size and each element like the following object |
|
static java.lang.Object |
minMaxLike(java.lang.Integer min, java.lang.Integer max, java.lang.Integer numberExamples = 1, java.lang.Object arg)Array with minimum and maximum size and each element like the following object |
|
static java.lang.Object |
nullValue()Matches a null value |
|
static java.lang.Object |
numeric(java.lang.Number value = null)Match a numeric value |
|
static java.lang.Object |
or(java.lang.Object example, java.lang.Object... values)Matches if any of the provided matches match |
|
static java.lang.Object |
real(java.lang.Number value = null)@deprecated Use decimal instead |
|
static java.lang.Object |
regexp(java.util.regex.Pattern re, java.lang.String value = null)Match a regular expression |
|
static java.lang.Object |
regexp(java.lang.String regexp, java.lang.String value = null)Match a regular expression |
|
static java.lang.Object |
string(java.lang.String value = null)Match any string value |
|
static java.lang.Object |
time(java.lang.String pattern = null, java.lang.Object value = null)Match a time |
|
static java.lang.Object |
timeExpression(java.lang.String expression, java.lang.String pattern = null)Match a time generated from an expression |
|
static java.lang.Object |
timestamp(java.lang.String pattern = null, java.lang.Object value = null)Match a timestamp |
|
static java.lang.Object |
timestampExpression(java.lang.String expression, java.lang.String pattern = null)Match a timestamp generated from an expression |
|
static java.lang.Object |
url(java.lang.String basePath, java.lang.Object... pathFragments)Matches a URL composed of a base path and a list of path fragments |
|
static java.lang.Object |
uuid(java.lang.String value = null)Match a universally unique identifier (UUID) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Matches if all of the provided matches match
example - Example value to useMatch any boolean
value - Example value, if not provided a random one will be generatedMatch a date
pattern - Pattern to use to match. If not provided, an ISO pattern will be used.value - Example value, if not provided the current date will be usedMatch a date generated from an expression
pattern - Pattern to use to match. If not provided, an ISO pattern will be used.expression - Expression to use to generate the dateMatch a decimal value
value - Example value, if not provided a random one will be generatedArray of arrays where each element like the following object
numberExamples - Optional number of examples to generate. Defaults to 1.Array where each element like the following object
numberExamples - Optional number of examples to generate. Defaults to 1.Match Equality
value - Value to match toMatch a globally unique ID (GUID)
value - optional value to use for examplesMatch a hexadecimal value
value - Example value, if not provided a random one will be generatedMatch a numeric identifier (integer)
value - Example value, if not provided a random one will be generatedMatches if the string is included in the value
value - String value that must be presentMatch a integer value
value - Example value, if not provided a random one will be generatedMatch an IP Address
value - Example value, if not provided 127.0.0.1 will be generatedArray with maximum size and each element like the following object
max - The maximum size of the arraynumberExamples - Optional number of examples to generate. Defaults to 1.Array with minimum size and each element like the following object
min - The minimum size of the arraynumberExamples - Optional number of examples to generate. Defaults to 1.Array with minimum and maximum size and each element like the following object
min - The minimum size of the arraymax - The maximum size of the arraynumberExamples - Optional number of examples to generate. Defaults to 1.Matches a null value
Match a numeric value
value - Example value, if not provided a random one will be generatedMatches if any of the provided matches match
example - Example value to useMatch a regular expression
re - Regular expression patternvalue - Example value, if not provided a random one will be generatedMatch a regular expression
re - Regular expression patternvalue - Example value, if not provided a random one will be generatedMatch any string value
value - Example value, if not provided a random one will be generatedMatch a time
pattern - Pattern to use to match. If not provided, an ISO pattern will be used.value - Example value, if not provided the current time will be usedMatch a time generated from an expression
pattern - Pattern to use to match. If not provided, an ISO pattern will be used.expression - Expression to use to generate the timeMatch a timestamp
pattern - Pattern to use to match. If not provided, an ISO pattern will be used.value - Example value, if not provided the current date and time will be usedMatch a timestamp generated from an expression
pattern - Pattern to use to match. If not provided, an ISO pattern will be used.expression - Expression to use to generate the timestampMatches a URL composed of a base path and a list of path fragments
Match a universally unique identifier (UUID)
value - optional value to use for examples