-
public class LambdaDslObject
-
-
Constructor Summary
Constructors Constructor Description LambdaDslObject(PactDslJsonBody object)
-
Method Summary
Modifier and Type Method Description PactDslJsonBody
getPactDslObject()
LambdaDslObject
stringValue(String name, String value)
LambdaDslObject
stringType(String name, String example)
LambdaDslObject
stringType(String name)
LambdaDslObject
stringType(Array<String> names)
LambdaDslObject
stringMatcher(String name, String example)
LambdaDslObject
stringMatcher(String name, String regex, String value)
LambdaDslObject
numberValue(String name, Number value)
LambdaDslObject
numberType(String name, Number example)
LambdaDslObject
numberType(Array<String> names)
LambdaDslObject
integerType(String name, Integer example)
LambdaDslObject
integerType(Array<String> names)
LambdaDslObject
decimalType(String name, BigDecimal value)
LambdaDslObject
decimalType(String name, Double example)
LambdaDslObject
decimalType(Array<String> names)
LambdaDslObject
booleanValue(String name, Boolean value)
LambdaDslObject
booleanType(String name, Boolean example)
LambdaDslObject
booleanType(Array<String> names)
LambdaDslObject
id()
LambdaDslObject
id(String name)
LambdaDslObject
id(String name, Long id)
LambdaDslObject
uuid(String name)
LambdaDslObject
uuid(String name, UUID id)
LambdaDslObject
date()
Attribute named 'date' that must be formatted as an ISO date LambdaDslObject
date(String name)
Attribute that must be formatted as an ISO date LambdaDslObject
date(String name, String format)
Attribute that must match the provided date format LambdaDslObject
date(String name, String format, Date example)
Attribute that must match the provided date format LambdaDslObject
date(String name, String format, Date example, TimeZone timeZone)
Attribute that must match the provided date format LambdaDslObject
date(String name, String format, ZonedDateTime example)
Attribute that must match the provided date format LambdaDslObject
time()
Attribute named 'time' that must be an ISO formatted time LambdaDslObject
time(String name)
Attribute that must be an ISO formatted time LambdaDslObject
time(String name, String format)
Attribute that must match the provided time format LambdaDslObject
time(String name, String format, Date example)
Attribute that must match the provided time format LambdaDslObject
time(String name, String format, Date example, TimeZone timeZone)
Attribute that must match the provided time format LambdaDslObject
time(String name, String format, ZonedDateTime example)
Attribute that must match the provided time format LambdaDslObject
timestamp()
Attribute named 'timestamp' that must be an ISO formatted timestamp LambdaDslObject
timestamp(String name)
Attribute that must be an ISO formatted timestamp LambdaDslObject
timestamp(String name, String format)
Attribute that must match the given timestamp format LambdaDslObject
timestamp(String name, String format, Date example)
Attribute that must match the given timestamp format LambdaDslObject
timestamp(String name, String format, Instant example)
Attribute that must match the given timestamp format LambdaDslObject
timestamp(String name, String format, Date example, TimeZone timeZone)
Attribute that must match the given timestamp format LambdaDslObject
timestamp(String name, String format, ZonedDateTime example)
Attribute that must match the given timestamp format LambdaDslObject
datetime(String name)
Attribute that must be an ISO formatted datetime LambdaDslObject
datetime(String name, String format)
Attribute that must match the given datetime format LambdaDslObject
datetime(String name, String format, Date example)
Attribute that must match the given datetime format LambdaDslObject
datetime(String name, String format, Instant example)
Attribute that must match the given datetime format LambdaDslObject
datetime(String name, String format, Date example, TimeZone timeZone)
Attribute that must match the given datetime format LambdaDslObject
datetime(String name, String format, ZonedDateTime example)
Attribute that must match the given timestamp format LambdaDslObject
ipV4Address(String name)
Attribute that must be an IP4 address LambdaDslObject
valueFromProviderState(String name, String expression, Object example)
Attribute that will have its value injected from the provider state LambdaDslObject
and(String name, Object value, Array<MatchingRule> rules)
Combine all the matchers using AND LambdaDslObject
or(String name, Object value, Array<MatchingRule> rules)
Combine all the matchers using OR LambdaDslObject
array(String name, Consumer<LambdaDslJsonArray> array)
LambdaDslObject
object(String name, Consumer<LambdaDslObject> nestedObject)
LambdaDslObject
eachLike(String name, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array where each item must match the following example LambdaDslObject
eachLike(String name, int numberExamples, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array where each item must match the following example LambdaDslObject
eachLike(String name, PactDslJsonRootValue value)
Attribute that is an array where each item is a primitive that must match the provided value LambdaDslObject
eachLike(String name, PactDslJsonRootValue value, int numberExamples)
Attribute that is an array where each item is a primitive that must match the provided value LambdaDslObject
minArrayLike(String name, Integer size, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array with a minimum size where each item must match the following example LambdaDslObject
minArrayLike(String name, Integer size, int numberExamples, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array with a minimum size where each item must match the following example LambdaDslObject
minArrayLike(String name, Integer size, PactDslJsonRootValue value, int numberExamples)
Attribute that is an array of values with a minimum size that are not objects where each item must match the following example LambdaDslObject
maxArrayLike(String name, Integer size, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array with a maximum size where each item must match the following example LambdaDslObject
maxArrayLike(String name, Integer size, int numberExamples, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array with a maximum size where each item must match the following example LambdaDslObject
maxArrayLike(String name, Integer size, PactDslJsonRootValue value, int numberExamples)
Attribute that is an array of values with a maximum size that are not objects where each item must match the following example LambdaDslObject
minMaxArrayLike(String name, Integer minSize, Integer maxSize, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array with a minimum and maximum size where each item must match the following example LambdaDslObject
minMaxArrayLike(String name, Integer minSize, Integer maxSize, int numberExamples, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array with a minimum and maximum size where each item must match the following example LambdaDslObject
minMaxArrayLike(String name, Integer minSize, Integer maxSize, PactDslJsonRootValue value, int numberExamples)
Attribute that is an array of values with a minimum and maximum size that are not objects where each item must match the following example LambdaDslObject
nullValue(String fieldName)
Sets the field to a null value LambdaDslObject
eachArrayLike(String name, Consumer<LambdaDslJsonArray> nestedArray)
LambdaDslObject
eachArrayLike(String name, int numberExamples, Consumer<LambdaDslJsonArray> nestedArray)
LambdaDslObject
eachArrayWithMaxLike(String name, Integer size, Consumer<LambdaDslJsonArray> nestedArray)
LambdaDslObject
eachArrayWithMaxLike(String name, int numberExamples, Integer size, Consumer<LambdaDslJsonArray> nestedArray)
LambdaDslObject
eachArrayWithMinLike(String name, Integer size, Consumer<LambdaDslJsonArray> nestedArray)
LambdaDslObject
eachArrayWithMinLike(String name, int numberExamples, Integer size, Consumer<LambdaDslJsonArray> nestedArray)
LambdaDslObject
eachArrayWithMinMaxLike(String name, Integer minSize, Integer maxSize, Consumer<LambdaDslJsonArray> nestedArray)
LambdaDslObject
eachArrayWithMinMaxLike(String name, Integer minSize, Integer maxSize, int numberExamples, Consumer<LambdaDslJsonArray> nestedArray)
LambdaDslObject
eachKeyMappedToAnArrayLike(String exampleKey, Consumer<LambdaDslObject> nestedObject)
Accepts any key, and each key is mapped to a list of items that must match the following object definition. LambdaDslObject
eachKeyLike(String exampleKey, Consumer<LambdaDslObject> nestedObject)
Accepts any key, and each key is mapped to a map that must match the following object definition. LambdaDslObject
eachKeyLike(String exampleKey, PactDslJsonRootValue value)
Accepts any key, and each key is mapped to a map that must match the provided object definition Note: this needs the Java system property "pact.matching.wildcard" set to value "true" when the pact file is verified. LambdaDslObject
dateExpression(String name, String expression)
Attribute whose values are generated from the provided expression. LambdaDslObject
dateExpression(String name, String expression, String format)
Attribute whose values are generated from the provided expression LambdaDslObject
timeExpression(String name, String expression)
Attribute whose values are generated from the provided expression. LambdaDslObject
timeExpression(String name, String expression, String format)
Attribute whose values are generated from the provided expression LambdaDslObject
datetimeExpression(String name, String expression)
Attribute whose values are generated from the provided expression. LambdaDslObject
datetimeExpression(String name, String expression, String format)
Attribute whose values are generated from the provided expression LambdaDslObject
unorderedArray(String name, Consumer<LambdaDslJsonArray> nestedArray)
Array field where order is ignored LambdaDslObject
unorderedMinArray(String name, int size, Consumer<LambdaDslJsonArray> nestedArray)
Array field of min size where order is ignored LambdaDslObject
unorderedMaxArray(String name, int size, Consumer<LambdaDslJsonArray> nestedArray)
Array field of max size where order is ignored LambdaDslObject
unorderedMinMaxArray(String name, int minSize, int maxSize, Consumer<LambdaDslJsonArray> nestedArray)
Array field of min and max size where order is ignored LambdaDslObject
matchUrl(String name, String basePath, Array<Object> pathFragments)
Matches a URL that is composed of a base path and a sequence of path expressions LambdaDslObject
matchUrl2(String name, Array<Object> pathFragments)
Matches a URL that is composed of a base path and a sequence of path expressions. LambdaDslObject
arrayContaining(String name, Consumer<LambdaDslJsonArray> nestedArray)
Matches the items in an array against a number of variants. -
-
Constructor Detail
-
LambdaDslObject
LambdaDslObject(PactDslJsonBody object)
-
-
Method Detail
-
getPactDslObject
PactDslJsonBody getPactDslObject()
-
stringValue
LambdaDslObject stringValue(String name, String value)
-
stringType
LambdaDslObject stringType(String name, String example)
-
stringType
LambdaDslObject stringType(String name)
-
stringType
LambdaDslObject stringType(Array<String> names)
-
stringMatcher
LambdaDslObject stringMatcher(String name, String example)
-
stringMatcher
LambdaDslObject stringMatcher(String name, String regex, String value)
-
numberValue
LambdaDslObject numberValue(String name, Number value)
-
numberType
LambdaDslObject numberType(String name, Number example)
-
numberType
LambdaDslObject numberType(Array<String> names)
-
integerType
LambdaDslObject integerType(String name, Integer example)
-
integerType
LambdaDslObject integerType(Array<String> names)
-
decimalType
LambdaDslObject decimalType(String name, BigDecimal value)
-
decimalType
LambdaDslObject decimalType(String name, Double example)
-
decimalType
LambdaDslObject decimalType(Array<String> names)
-
booleanValue
LambdaDslObject booleanValue(String name, Boolean value)
-
booleanType
LambdaDslObject booleanType(String name, Boolean example)
-
booleanType
LambdaDslObject booleanType(Array<String> names)
-
id
LambdaDslObject id()
-
id
LambdaDslObject id(String name)
-
id
LambdaDslObject id(String name, Long id)
-
uuid
LambdaDslObject uuid(String name)
-
uuid
LambdaDslObject uuid(String name, UUID id)
-
date
LambdaDslObject date()
Attribute named 'date' that must be formatted as an ISO date
-
date
LambdaDslObject date(String name)
Attribute that must be formatted as an ISO date
- Parameters:
name
- attribute name
-
date
LambdaDslObject date(String name, String format)
Attribute that must match the provided date format
- Parameters:
name
- attribute dateformat
- date format to match
-
date
LambdaDslObject date(String name, String format, Date example)
Attribute that must match the provided date format
- Parameters:
name
- attribute dateformat
- date format to matchexample
- example date to use for generated values
-
date
LambdaDslObject date(String name, String format, Date example, TimeZone timeZone)
Attribute that must match the provided date format
- Parameters:
name
- attribute dateformat
- date format to matchexample
- example date to use for generated valuestimeZone
- time zone used for formatting of example date
-
date
LambdaDslObject date(String name, String format, ZonedDateTime example)
Attribute that must match the provided date format
- Parameters:
name
- attribute dateformat
- date format to matchexample
- example date to use for generated values
-
time
LambdaDslObject time()
Attribute named 'time' that must be an ISO formatted time
-
time
LambdaDslObject time(String name)
Attribute that must be an ISO formatted time
- Parameters:
name
- attribute name
-
time
LambdaDslObject time(String name, String format)
Attribute that must match the provided time format
- Parameters:
name
- attribute timeformat
- time format to match
-
time
LambdaDslObject time(String name, String format, Date example)
Attribute that must match the provided time format
- Parameters:
name
- attribute nameformat
- time format to matchexample
- example time to use for generated values
-
time
LambdaDslObject time(String name, String format, Date example, TimeZone timeZone)
Attribute that must match the provided time format
- Parameters:
name
- attribute nameformat
- time format to matchexample
- example time to use for generated valuestimeZone
- time zone used for formatting of example time
-
time
LambdaDslObject time(String name, String format, ZonedDateTime example)
Attribute that must match the provided time format
- Parameters:
name
- attribute nameformat
- time format to matchexample
- example time to use for generated values
-
timestamp
LambdaDslObject timestamp()
Attribute named 'timestamp' that must be an ISO formatted timestamp
-
timestamp
@Deprecated() LambdaDslObject timestamp(String name)
Attribute that must be an ISO formatted timestamp
- Parameters:
name
- attribute name
-
timestamp
@Deprecated() LambdaDslObject timestamp(String name, String format)
Attribute that must match the given timestamp format
- Parameters:
name
- attribute nameformat
- timestamp format
-
timestamp
@Deprecated() LambdaDslObject timestamp(String name, String format, Date example)
Attribute that must match the given timestamp format
- Parameters:
name
- attribute nameformat
- timestamp formatexample
- example date and time to use for generated bodies
-
timestamp
@Deprecated() LambdaDslObject timestamp(String name, String format, Instant example)
Attribute that must match the given timestamp format
- Parameters:
name
- attribute nameformat
- timestamp formatexample
- example date and time to use for generated bodies
-
timestamp
@Deprecated() LambdaDslObject timestamp(String name, String format, Date example, TimeZone timeZone)
Attribute that must match the given timestamp format
- Parameters:
name
- attribute nameformat
- timestamp formatexample
- example date and time to use for generated bodiestimeZone
- time zone used for formatting of example date and time
-
timestamp
@Deprecated() LambdaDslObject timestamp(String name, String format, ZonedDateTime example)
Attribute that must match the given timestamp format
- Parameters:
name
- attribute nameformat
- timestamp formatexample
- example date and time to use for generated bodies
-
datetime
LambdaDslObject datetime(String name)
Attribute that must be an ISO formatted datetime
- Parameters:
name
- attribute name
-
datetime
LambdaDslObject datetime(String name, String format)
Attribute that must match the given datetime format
- Parameters:
name
- attribute nameformat
- datetime format
-
datetime
LambdaDslObject datetime(String name, String format, Date example)
Attribute that must match the given datetime format
- Parameters:
name
- attribute nameformat
- datetime formatexample
- example date and time to use for generated bodies
-
datetime
LambdaDslObject datetime(String name, String format, Instant example)
Attribute that must match the given datetime format
- Parameters:
name
- attribute nameformat
- datetime formatexample
- example date and time to use for generated bodies
-
datetime
LambdaDslObject datetime(String name, String format, Date example, TimeZone timeZone)
Attribute that must match the given datetime format
- Parameters:
name
- attribute nameformat
- datetime formatexample
- example date and time to use for generated bodiestimeZone
- time zone used for formatting of example date and time
-
datetime
LambdaDslObject datetime(String name, String format, ZonedDateTime example)
Attribute that must match the given timestamp format
- Parameters:
name
- attribute nameformat
- datetime formatexample
- example date and time to use for generated bodies
-
ipV4Address
LambdaDslObject ipV4Address(String name)
Attribute that must be an IP4 address
- Parameters:
name
- attribute name
-
valueFromProviderState
LambdaDslObject valueFromProviderState(String name, String expression, Object example)
Attribute that will have its value injected from the provider state
- Parameters:
name
- Attribute nameexpression
- Expression to be evaluated from the provider stateexample
- Example value to be used in the consumer test
-
and
LambdaDslObject and(String name, Object value, Array<MatchingRule> rules)
Combine all the matchers using AND
- Parameters:
name
- Attribute namevalue
- Attribute example valuerules
- Matching rules to apply
-
or
LambdaDslObject or(String name, Object value, Array<MatchingRule> rules)
Combine all the matchers using OR
- Parameters:
name
- Attribute namevalue
- Attribute example valuerules
- Matching rules to apply
-
array
LambdaDslObject array(String name, Consumer<LambdaDslJsonArray> array)
-
object
LambdaDslObject object(String name, Consumer<LambdaDslObject> nestedObject)
-
eachLike
LambdaDslObject eachLike(String name, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array where each item must match the following example
- Parameters:
name
- field name
-
eachLike
LambdaDslObject eachLike(String name, int numberExamples, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array where each item must match the following example
- Parameters:
name
- field namenumberExamples
- number of examples to generate
-
eachLike
LambdaDslObject eachLike(String name, PactDslJsonRootValue value)
Attribute that is an array where each item is a primitive that must match the provided value
- Parameters:
name
- field namevalue
- Value that each item in the array must match
-
eachLike
LambdaDslObject eachLike(String name, PactDslJsonRootValue value, int numberExamples)
Attribute that is an array where each item is a primitive that must match the provided value
- Parameters:
name
- field namevalue
- Value that each item in the array must matchnumberExamples
- Number of examples to generate
-
minArrayLike
LambdaDslObject minArrayLike(String name, Integer size, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array with a minimum size where each item must match the following example
- Parameters:
name
- field namesize
- minimum size of the array
-
minArrayLike
LambdaDslObject minArrayLike(String name, Integer size, int numberExamples, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array with a minimum size where each item must match the following example
- Parameters:
name
- field namesize
- minimum size of the arraynumberExamples
- number of examples to generate
-
minArrayLike
LambdaDslObject minArrayLike(String name, Integer size, PactDslJsonRootValue value, int numberExamples)
Attribute that is an array of values with a minimum size that are not objects where each item must match the following example
- Parameters:
name
- field namesize
- minimum size of the arrayvalue
- Value to use to match each itemnumberExamples
- number of examples to generate
-
maxArrayLike
LambdaDslObject maxArrayLike(String name, Integer size, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array with a maximum size where each item must match the following example
- Parameters:
name
- field namesize
- maximum size of the array
-
maxArrayLike
LambdaDslObject maxArrayLike(String name, Integer size, int numberExamples, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array with a maximum size where each item must match the following example
- Parameters:
name
- field namesize
- maximum size of the arraynumberExamples
- number of examples to generate
-
maxArrayLike
LambdaDslObject maxArrayLike(String name, Integer size, PactDslJsonRootValue value, int numberExamples)
Attribute that is an array of values with a maximum size that are not objects where each item must match the following example
- Parameters:
name
- field namesize
- maximum size of the arrayvalue
- Value to use to match each itemnumberExamples
- number of examples to generate
-
minMaxArrayLike
LambdaDslObject minMaxArrayLike(String name, Integer minSize, Integer maxSize, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array with a minimum and maximum size where each item must match the following example
- Parameters:
name
- field nameminSize
- minimum size of the arraymaxSize
- maximum size of the array
-
minMaxArrayLike
LambdaDslObject minMaxArrayLike(String name, Integer minSize, Integer maxSize, int numberExamples, Consumer<LambdaDslObject> nestedObject)
Attribute that is an array with a minimum and maximum size where each item must match the following example
- Parameters:
name
- field nameminSize
- minimum size of the arraymaxSize
- maximum size of the arraynumberExamples
- number of examples to generate
-
minMaxArrayLike
LambdaDslObject minMaxArrayLike(String name, Integer minSize, Integer maxSize, PactDslJsonRootValue value, int numberExamples)
Attribute that is an array of values with a minimum and maximum size that are not objects where each item must match the following example
- Parameters:
name
- field nameminSize
- minimum size of the arraymaxSize
- maximum size of the arrayvalue
- Value to use to match each itemnumberExamples
- number of examples to generate
-
nullValue
LambdaDslObject nullValue(String fieldName)
Sets the field to a null value
- Parameters:
fieldName
- field name
-
eachArrayLike
LambdaDslObject eachArrayLike(String name, Consumer<LambdaDslJsonArray> nestedArray)
-
eachArrayLike
LambdaDslObject eachArrayLike(String name, int numberExamples, Consumer<LambdaDslJsonArray> nestedArray)
-
eachArrayWithMaxLike
LambdaDslObject eachArrayWithMaxLike(String name, Integer size, Consumer<LambdaDslJsonArray> nestedArray)
-
eachArrayWithMaxLike
LambdaDslObject eachArrayWithMaxLike(String name, int numberExamples, Integer size, Consumer<LambdaDslJsonArray> nestedArray)
-
eachArrayWithMinLike
LambdaDslObject eachArrayWithMinLike(String name, Integer size, Consumer<LambdaDslJsonArray> nestedArray)
-
eachArrayWithMinLike
LambdaDslObject eachArrayWithMinLike(String name, int numberExamples, Integer size, Consumer<LambdaDslJsonArray> nestedArray)
-
eachArrayWithMinMaxLike
LambdaDslObject eachArrayWithMinMaxLike(String name, Integer minSize, Integer maxSize, Consumer<LambdaDslJsonArray> nestedArray)
-
eachArrayWithMinMaxLike
LambdaDslObject eachArrayWithMinMaxLike(String name, Integer minSize, Integer maxSize, int numberExamples, Consumer<LambdaDslJsonArray> nestedArray)
-
eachKeyMappedToAnArrayLike
LambdaDslObject eachKeyMappedToAnArrayLike(String exampleKey, Consumer<LambdaDslObject> nestedObject)
Accepts any key, and each key is mapped to a list of items that must match the following object definition. Note: this needs the Java system property "pact.matching.wildcard" set to value "true" when the pact file is verified.
- Parameters:
exampleKey
- Example key to use for generating bodies
-
eachKeyLike
LambdaDslObject eachKeyLike(String exampleKey, Consumer<LambdaDslObject> nestedObject)
Accepts any key, and each key is mapped to a map that must match the following object definition. Note: this needs the Java system property "pact.matching.wildcard" set to value "true" when the pact file is verified.
- Parameters:
exampleKey
- Example key to use for generating bodies
-
eachKeyLike
LambdaDslObject eachKeyLike(String exampleKey, PactDslJsonRootValue value)
Accepts any key, and each key is mapped to a map that must match the provided object definition Note: this needs the Java system property "pact.matching.wildcard" set to value "true" when the pact file is verified.
- Parameters:
exampleKey
- Example key to use for generating bodiesvalue
- Value to use for matching and generated bodies
-
dateExpression
LambdaDslObject dateExpression(String name, String expression)
Attribute whose values are generated from the provided expression. Will use an ISO format.
- Parameters:
name
- Attribute nameexpression
- Date expression
-
dateExpression
LambdaDslObject dateExpression(String name, String expression, String format)
Attribute whose values are generated from the provided expression
- Parameters:
name
- Attribute nameexpression
- Date expressionformat
- Date format to use for values
-
timeExpression
LambdaDslObject timeExpression(String name, String expression)
Attribute whose values are generated from the provided expression. Will use an ISO format.
- Parameters:
name
- Attribute nameexpression
- Time expression
-
timeExpression
LambdaDslObject timeExpression(String name, String expression, String format)
Attribute whose values are generated from the provided expression
- Parameters:
name
- Attribute nameexpression
- Time expressionformat
- Time format to use for values
-
datetimeExpression
LambdaDslObject datetimeExpression(String name, String expression)
Attribute whose values are generated from the provided expression. Will use an ISO format.
- Parameters:
name
- Attribute nameexpression
- Datetime expression
-
datetimeExpression
LambdaDslObject datetimeExpression(String name, String expression, String format)
Attribute whose values are generated from the provided expression
- Parameters:
name
- Attribute nameexpression
- Datetime expressionformat
- Datetime format to use for values
-
unorderedArray
LambdaDslObject unorderedArray(String name, Consumer<LambdaDslJsonArray> nestedArray)
Array field where order is ignored
- Parameters:
name
- field name
-
unorderedMinArray
LambdaDslObject unorderedMinArray(String name, int size, Consumer<LambdaDslJsonArray> nestedArray)
Array field of min size where order is ignored
- Parameters:
name
- field namesize
- minimum size
-
unorderedMaxArray
LambdaDslObject unorderedMaxArray(String name, int size, Consumer<LambdaDslJsonArray> nestedArray)
Array field of max size where order is ignored
- Parameters:
name
- field namesize
- maximum size
-
unorderedMinMaxArray
LambdaDslObject unorderedMinMaxArray(String name, int minSize, int maxSize, Consumer<LambdaDslJsonArray> nestedArray)
Array field of min and max size where order is ignored
- Parameters:
name
- field nameminSize
- minimum sizemaxSize
- maximum size
-
matchUrl
LambdaDslObject matchUrl(String name, String basePath, Array<Object> pathFragments)
Matches a URL that is composed of a base path and a sequence of path expressions
- Parameters:
name
- Attribute namebasePath
- The base path for the URL (like "http://localhost:8080/") which will be excluded from the matchingpathFragments
- Series of path fragments to match on.
-
matchUrl2
LambdaDslObject matchUrl2(String name, Array<Object> pathFragments)
Matches a URL that is composed of a base path and a sequence of path expressions. The base path of the mock server will be used.
- Parameters:
name
- Attribute namepathFragments
- Series of path fragments to match on.
-
arrayContaining
LambdaDslObject arrayContaining(String name, Consumer<LambdaDslJsonArray> nestedArray)
Matches the items in an array against a number of variants. Matching is successful if each variant occurs once in the array. Variants may be objects containing matching rules.
- Parameters:
name
- Attribute name
-
-
-
-