public class ArrayOfPrimitivesBuilder
| Constructor and Description |
|---|
ArrayOfPrimitivesBuilder() |
| Modifier and Type | Method and Description |
|---|---|
au.com.dius.pact.consumer.dsl.DslPart |
build()
Consumes this builder and returns the DslPart that it represents
|
int |
getExamples() |
au.com.dius.pact.model.generators.Generator |
getGenerator() |
au.com.dius.pact.model.matchingrules.MatchingRule |
getMatcher() |
java.lang.Integer |
getMaxLength() |
java.lang.Integer |
getMinLength() |
java.lang.Object |
getValue() |
void |
setExamples(int p) |
void |
setGenerator(au.com.dius.pact.model.generators.Generator p) |
void |
setMatcher(au.com.dius.pact.model.matchingrules.MatchingRule p) |
void |
setMaxLength(java.lang.Integer p) |
void |
setMinLength(java.lang.Integer p) |
void |
setValue(java.lang.Object p) |
ArrayOfPrimitivesBuilder |
thatMatchRegex(java.lang.String regex)
All the values in the array must match the provided regex
|
ArrayOfPrimitivesBuilder |
thatMatchRegex(java.lang.String regex,
java.lang.String example)
All the values in the array must match the provided regex
|
ArrayOfPrimitivesBuilder |
withMaxLength(int max)
Array must have a maximum length
|
ArrayOfPrimitivesBuilder |
withMinLength(int min)
Array must have a minimum length
|
ArrayOfPrimitivesBuilder |
withNumberOfExamples(int examples)
Sets the number of examples to generate in the array
|
public java.lang.Integer getMinLength()
public void setMinLength(java.lang.Integer p)
public java.lang.Integer getMaxLength()
public void setMaxLength(java.lang.Integer p)
public int getExamples()
public void setExamples(int p)
public au.com.dius.pact.model.matchingrules.MatchingRule getMatcher()
public void setMatcher(au.com.dius.pact.model.matchingrules.MatchingRule p)
public java.lang.Object getValue()
public void setValue(java.lang.Object p)
public au.com.dius.pact.model.generators.Generator getGenerator()
public void setGenerator(au.com.dius.pact.model.generators.Generator p)
public ArrayOfPrimitivesBuilder withMinLength(int min)
Array must have a minimum length
min - Minimum lengthpublic ArrayOfPrimitivesBuilder withMaxLength(int max)
Array must have a maximum length
max - Maximum lengthpublic ArrayOfPrimitivesBuilder withNumberOfExamples(int examples)
Sets the number of examples to generate in the array
examples - Number of examples to generate. It must fall within in min and max bounds that are setpublic ArrayOfPrimitivesBuilder thatMatchRegex(java.lang.String regex)
All the values in the array must match the provided regex
regex - Regex to matchpublic ArrayOfPrimitivesBuilder thatMatchRegex(java.lang.String regex, java.lang.String example)
All the values in the array must match the provided regex
regex - Regex to matchexample - Example value to use when generating bodiespublic au.com.dius.pact.consumer.dsl.DslPart build()
Consumes this builder and returns the DslPart that it represents