-
public class LambdaDslJsonArray
-
-
Constructor Summary
Constructors Constructor Description LambdaDslJsonArray(PactDslJsonArray pactArray)
-
Method Summary
Modifier and Type Method Description PactDslJsonArraygetPactDslJsonArray()Get the raw PactDslJsonArray which is abstracted with PactDslJsonArray LambdaDslJsonArrayobject(Consumer<LambdaDslObject> o)Element that is a JSON object LambdaDslJsonArrayarray(Consumer<LambdaDslJsonArray> a)Element that is a JSON array LambdaDslJsonArrayunorderedArray(Consumer<LambdaDslJsonArray> a)Array element where order is ignored LambdaDslJsonArrayunorderedMinArray(int size, Consumer<LambdaDslJsonArray> a)Array element of min size where order is ignored LambdaDslJsonArrayunorderedMaxArray(int size, Consumer<LambdaDslJsonArray> a)Array element of max size where order is ignored LambdaDslJsonArrayunorderedMinMaxArray(int minSize, int maxSize, Consumer<LambdaDslJsonArray> a)Array element of min and max size where order is ignored LambdaDslJsonArraystringValue(String value)Element that must be the specified value LambdaDslJsonArraystringType(String example)Element that can be any string LambdaDslJsonArraystringMatcher(String regex, String example)Element that must match the regular expression LambdaDslJsonArraynumberValue(Number value)Element that must be the specified number LambdaDslJsonArraynumberType(Number example)Element that can be any number LambdaDslJsonArrayintegerType()Element that must be an integer LambdaDslJsonArrayintegerType(Long example)Element that must be an integer LambdaDslJsonArraydecimalType()Element that must be a decimal value LambdaDslJsonArraydecimalType(BigDecimal example)Element that must be a decimalType value LambdaDslJsonArraydecimalType(Double example)Attribute that must be a decimalType value LambdaDslJsonArraybooleanValue(Boolean value)Element that must be the specified value LambdaDslJsonArraybooleanType(Boolean example)Element that must be a boolean LambdaDslJsonArraydate()Element that must be formatted as an ISO date LambdaDslJsonArraydate(String format)Element that must match the provided date format LambdaDslJsonArraydate(String format, Date example)Element that must match the provided date format LambdaDslJsonArraytime()Element that must be an ISO formatted time LambdaDslJsonArraytime(String format)Element that must match the given time format LambdaDslJsonArraytime(String format, Date example)Element that must match the given time format LambdaDslJsonArraytimestamp()Element that must be an ISO formatted timestamp LambdaDslJsonArraytimestamp(String format)Element that must match the given timestamp format LambdaDslJsonArraytimestamp(String format, Date example)Element that must match the given timestamp format LambdaDslJsonArraytimestamp(String format, Instant example)Element that must match the given timestamp format LambdaDslJsonArrayid()Element that must be a numeric identifier LambdaDslJsonArrayid(Long example)Element that must be a numeric identifier LambdaDslJsonArrayuuid()Element that must be encoded as an UUID LambdaDslJsonArrayuuid(String example)Element that must be encoded as an UUID LambdaDslJsonArrayhexValue()Element that must be encoded as a hexadecimal value LambdaDslJsonArrayhexValue(String example)Element that must be encoded as a hexadecimal value LambdaDslJsonArrayipV4Address()Element that must be an IP4 address LambdaDslJsonArrayand(Object value, Array<MatchingRule> rules)Combine all the matchers using AND LambdaDslJsonArrayor(Object value, Array<MatchingRule> rules)Combine all the matchers using OR LambdaDslJsonArrayeachLike(Consumer<LambdaDslJsonBody> nestedObject)Element that is an array where each item must match the following example LambdaDslJsonArrayeachLike(PactDslJsonRootValue value)Element that is an array where each item must match the following example LambdaDslJsonArrayeachLike(PactDslJsonRootValue value, int numberExamples)Element that is an array where each item must match the following example LambdaDslJsonArrayeachLike(int numberExamples, Consumer<LambdaDslJsonBody> nestedObject)Element that is an array where each item must match the following example LambdaDslJsonArrayminArrayLike(Integer size, Consumer<LambdaDslJsonBody> nestedObject)Element that is an array with a minimum size where each item must match the following example LambdaDslJsonArrayminArrayLike(Integer size, int numberExamples, Consumer<LambdaDslJsonBody> nestedObject)Element that is an array with a minimum size where each item must match the following example LambdaDslJsonArraymaxArrayLike(Integer size, Consumer<LambdaDslJsonBody> nestedObject)Element that is an array with a maximum size where each item must match the following example LambdaDslJsonArraymaxArrayLike(Integer size, int numberExamples, Consumer<LambdaDslJsonBody> nestedObject)Element that is an array with a maximum size where each item must match the following example LambdaDslJsonArrayminMaxArrayLike(Integer minSize, Integer maxSize, Consumer<LambdaDslJsonBody> nestedObject)Element that is an array with a minimum and maximum size where each item must match the following example LambdaDslJsonArrayminMaxArrayLike(Integer minSize, Integer maxSize, int numberExamples, Consumer<LambdaDslJsonBody> nestedObject)Element that is an array with a minimum and maximum size where each item must match the following example LambdaDslJsonArraynullValue()Adds a null value to the list LambdaDslJsonArrayeachArrayLike(Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following object LambdaDslJsonArrayeachArrayLike(int numberExamples, Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following object LambdaDslJsonArrayeachArrayWithMaxLike(Integer size, Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following object. LambdaDslJsonArrayeachArrayWithMaxLike(int numberExamples, Integer size, Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following object LambdaDslJsonArrayeachArrayWithMinLike(Integer size, Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following object. LambdaDslJsonArrayeachArrayWithMinLike(int numberExamples, Integer size, Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following object LambdaDslJsonArrayeachArrayWithMinMaxLike(Integer minSize, Integer maxSize, Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following object. LambdaDslJsonArrayeachArrayWithMinMaxLike(Integer minSize, Integer maxSize, int numberExamples, Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following object LambdaDslJsonArraydateExpression(String expression)Date value generated from the provided expression. LambdaDslJsonArraydateExpression(String expression, String format)Date value generated from the provided expression LambdaDslJsonArraytimeExpression(String expression)Time value generated from the provided expression. LambdaDslJsonArraytimeExpression(String expression, String format)Time value generated from the provided expression LambdaDslJsonArraydatetimeExpression(String expression)Datetime generated from the provided expression. LambdaDslJsonArraydatetimeExpression(String expression, String format)Datetime generated from the provided expression DslPartbuild()-
-
Constructor Detail
-
LambdaDslJsonArray
LambdaDslJsonArray(PactDslJsonArray pactArray)
-
-
Method Detail
-
getPactDslJsonArray
PactDslJsonArray getPactDslJsonArray()
Get the raw PactDslJsonArray which is abstracted with PactDslJsonArray
-
object
LambdaDslJsonArray object(Consumer<LambdaDslObject> o)
Element that is a JSON object
-
array
LambdaDslJsonArray array(Consumer<LambdaDslJsonArray> a)
Element that is a JSON array
-
unorderedArray
LambdaDslJsonArray unorderedArray(Consumer<LambdaDslJsonArray> a)
Array element where order is ignored
-
unorderedMinArray
LambdaDslJsonArray unorderedMinArray(int size, Consumer<LambdaDslJsonArray> a)
Array element of min size where order is ignored
-
unorderedMaxArray
LambdaDslJsonArray unorderedMaxArray(int size, Consumer<LambdaDslJsonArray> a)
Array element of max size where order is ignored
-
unorderedMinMaxArray
LambdaDslJsonArray unorderedMinMaxArray(int minSize, int maxSize, Consumer<LambdaDslJsonArray> a)
Array element of min and max size where order is ignored
-
stringValue
LambdaDslJsonArray stringValue(String value)
Element that must be the specified value
- Parameters:
value- string value
-
stringType
LambdaDslJsonArray stringType(String example)
Element that can be any string
- Parameters:
example- example value to use for generated bodies
-
stringMatcher
LambdaDslJsonArray stringMatcher(String regex, String example)
Element that must match the regular expression
- Parameters:
regex- regular expressionexample- example value to use for generated bodies
-
numberValue
LambdaDslJsonArray numberValue(Number value)
Element that must be the specified number
- Parameters:
value- number value
-
numberType
LambdaDslJsonArray numberType(Number example)
Element that can be any number
- Parameters:
example- example number to use for generated bodies
-
integerType
LambdaDslJsonArray integerType()
Element that must be an integer
-
integerType
LambdaDslJsonArray integerType(Long example)
Element that must be an integer
- Parameters:
example- example integer value to use for generated bodies
-
decimalType
LambdaDslJsonArray decimalType()
Element that must be a decimal value
-
decimalType
LambdaDslJsonArray decimalType(BigDecimal example)
Element that must be a decimalType value
- Parameters:
example- example decimalType value
-
decimalType
LambdaDslJsonArray decimalType(Double example)
Attribute that must be a decimalType value
- Parameters:
example- example decimalType value
-
booleanValue
LambdaDslJsonArray booleanValue(Boolean value)
Element that must be the specified value
- Parameters:
value- boolean value
-
booleanType
LambdaDslJsonArray booleanType(Boolean example)
Element that must be a boolean
- Parameters:
example- example boolean to use for generated bodies
-
date
LambdaDslJsonArray date()
Element that must be formatted as an ISO date
-
date
LambdaDslJsonArray date(String format)
Element that must match the provided date format
- Parameters:
format- date format to match
-
date
LambdaDslJsonArray date(String format, Date example)
Element that must match the provided date format
- Parameters:
format- date format to matchexample- example date to use for generated values
-
time
LambdaDslJsonArray time()
Element that must be an ISO formatted time
-
time
LambdaDslJsonArray time(String format)
Element that must match the given time format
- Parameters:
format- time format to match
-
time
LambdaDslJsonArray time(String format, Date example)
Element that must match the given time format
- Parameters:
format- time format to matchexample- example time to use for generated bodies
-
timestamp
LambdaDslJsonArray timestamp()
Element that must be an ISO formatted timestamp
-
timestamp
LambdaDslJsonArray timestamp(String format)
Element that must match the given timestamp format
- Parameters:
format- timestamp format
-
timestamp
LambdaDslJsonArray timestamp(String format, Date example)
Element that must match the given timestamp format
- Parameters:
format- timestamp formatexample- example date and time to use for generated bodies
-
timestamp
LambdaDslJsonArray timestamp(String format, Instant example)
Element that must match the given timestamp format
- Parameters:
format- timestamp formatexample- example date and time to use for generated bodies
-
id
LambdaDslJsonArray id()
Element that must be a numeric identifier
-
id
LambdaDslJsonArray id(Long example)
Element that must be a numeric identifier
- Parameters:
example- example id to use for generated bodies
-
uuid
LambdaDslJsonArray uuid()
Element that must be encoded as an UUID
-
uuid
LambdaDslJsonArray uuid(String example)
Element that must be encoded as an UUID
- Parameters:
example- example UUID to use for generated bodies
-
hexValue
LambdaDslJsonArray hexValue()
Element that must be encoded as a hexadecimal value
-
hexValue
LambdaDslJsonArray hexValue(String example)
Element that must be encoded as a hexadecimal value
- Parameters:
example- example value to use for generated bodies
-
ipV4Address
LambdaDslJsonArray ipV4Address()
Element that must be an IP4 address
-
and
LambdaDslJsonArray and(Object value, Array<MatchingRule> rules)
Combine all the matchers using AND
- Parameters:
value- Attribute example valuerules- Matching rules to apply
-
or
LambdaDslJsonArray or(Object value, Array<MatchingRule> rules)
Combine all the matchers using OR
- Parameters:
value- Attribute example valuerules- Matching rules to apply
-
eachLike
LambdaDslJsonArray eachLike(Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array where each item must match the following example
-
eachLike
LambdaDslJsonArray eachLike(PactDslJsonRootValue value)
Element that is an array where each item must match the following example
- Parameters:
value- Value that each item in the array must match
-
eachLike
LambdaDslJsonArray eachLike(PactDslJsonRootValue value, int numberExamples)
Element that is an array where each item must match the following example
- Parameters:
value- Value that each item in the array must matchnumberExamples- Number of examples to generate
-
eachLike
LambdaDslJsonArray eachLike(int numberExamples, Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array where each item must match the following example
- Parameters:
numberExamples- Number of examples to generate
-
minArrayLike
LambdaDslJsonArray minArrayLike(Integer size, Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array with a minimum size where each item must match the following example
- Parameters:
size- minimum size of the array
-
minArrayLike
LambdaDslJsonArray minArrayLike(Integer size, int numberExamples, Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array with a minimum size where each item must match the following example
- Parameters:
size- minimum size of the arraynumberExamples- number of examples to generate
-
maxArrayLike
LambdaDslJsonArray maxArrayLike(Integer size, Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array with a maximum size where each item must match the following example
- Parameters:
size- maximum size of the array
-
maxArrayLike
LambdaDslJsonArray maxArrayLike(Integer size, int numberExamples, Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array with a maximum size where each item must match the following example
- Parameters:
size- maximum size of the arraynumberExamples- number of examples to generate
-
minMaxArrayLike
LambdaDslJsonArray minMaxArrayLike(Integer minSize, Integer maxSize, Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array with a minimum and maximum size where each item must match the following example
- Parameters:
minSize- minimum size of the arraymaxSize- maximum size of the array
-
minMaxArrayLike
LambdaDslJsonArray minMaxArrayLike(Integer minSize, Integer maxSize, int numberExamples, Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array with a minimum and maximum size where each item must match the following example
- Parameters:
minSize- minimum size of the arraymaxSize- maximum size of the arraynumberExamples- number of examples to generate
-
nullValue
LambdaDslJsonArray nullValue()
Adds a null value to the list
-
eachArrayLike
LambdaDslJsonArray eachArrayLike(Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object
-
eachArrayLike
LambdaDslJsonArray eachArrayLike(int numberExamples, Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object
- Parameters:
numberExamples- number of examples to generate
-
eachArrayWithMaxLike
LambdaDslJsonArray eachArrayWithMaxLike(Integer size, Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object. This will generate 1 example value, if you want to change that number use
- Parameters:
size- Maximum size of the outer array
-
eachArrayWithMaxLike
LambdaDslJsonArray eachArrayWithMaxLike(int numberExamples, Integer size, Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object
- Parameters:
numberExamples- number of examples to generatesize- Maximum size of the outer array
-
eachArrayWithMinLike
LambdaDslJsonArray eachArrayWithMinLike(Integer size, Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object. This will generate 1 example value, if you want to change that number use
- Parameters:
size- Minimum size of the outer array
-
eachArrayWithMinLike
LambdaDslJsonArray eachArrayWithMinLike(int numberExamples, Integer size, Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object
- Parameters:
numberExamples- number of examples to generatesize- Minimum size of the outer array
-
eachArrayWithMinMaxLike
LambdaDslJsonArray eachArrayWithMinMaxLike(Integer minSize, Integer maxSize, Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object. This will generate 1 example value, if you want to change that number use
- Parameters:
minSize- minimum sizemaxSize- maximum size
-
eachArrayWithMinMaxLike
LambdaDslJsonArray eachArrayWithMinMaxLike(Integer minSize, Integer maxSize, int numberExamples, Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object
- Parameters:
minSize- minimum sizemaxSize- maximum size
-
dateExpression
LambdaDslJsonArray dateExpression(String expression)
Date value generated from the provided expression. Will use an ISO format.
- Parameters:
expression- Date expression
-
dateExpression
LambdaDslJsonArray dateExpression(String expression, String format)
Date value generated from the provided expression
- Parameters:
expression- Date expressionformat- Date format to use for values
-
timeExpression
LambdaDslJsonArray timeExpression(String expression)
Time value generated from the provided expression. Will use an ISO format.
- Parameters:
expression- Time expression
-
timeExpression
LambdaDslJsonArray timeExpression(String expression, String format)
Time value generated from the provided expression
- Parameters:
expression- Time expressionformat- Time format to use for values
-
datetimeExpression
LambdaDslJsonArray datetimeExpression(String expression)
Datetime generated from the provided expression. Will use an ISO format.
- Parameters:
expression- Datetime expression
-
datetimeExpression
LambdaDslJsonArray datetimeExpression(String expression, String format)
Datetime generated from the provided expression
- Parameters:
expression- Datetime expressionformat- Datetime format to use for values
-
-
-
-