public class StringParam extends NamedTypedValue<StringType,String> implements NumericConstraintBase<BigDecimal>
accessibleSchema, objectMaper| Constructor and Description |
|---|
StringParam(String name,
AccessibleSchema accessibleSchema,
JavaDtoSpec spec) |
StringParam(String name,
StringType type,
AccessibleSchema accessibleSchema) |
| Modifier and Type | Method and Description |
|---|---|
void |
copyProperties(NamedTypedValue copy) |
StringParam |
copyStructure() |
ParamDto |
getDto()
get its dto format in order to further handle it with evomastr core
|
BigDecimal |
getMax() |
boolean |
getMaxInclusive() |
Integer |
getMaxSize() |
BigDecimal |
getMin() |
boolean |
getMinInclusive() |
Integer |
getMinSize() |
String |
getPattern() |
Integer |
getPrecision() |
Integer |
getScale() |
String |
getValueAsJavaString(boolean isJava) |
List<String> |
newAssertionWithJavaOrKotlin(int indent,
String responseVarName,
int maxAssertionForDataInCollection,
boolean isJava)
create assertions with java for response
|
Object |
newInstance() |
List<String> |
newInstanceWithJavaOrKotlin(boolean isDeclaration,
boolean doesIncludeName,
String variableName,
int indent,
boolean isJava,
boolean isVariableNullable)
create instances with Java
|
List<String> |
referenceTypes() |
void |
setMax(BigDecimal max) |
void |
setMaxInclusive(boolean inclusive) |
void |
setMaxSize(Integer maxSize) |
void |
setMin(BigDecimal min) |
void |
setMinInclusive(boolean inclusive) |
void |
setMinSize(Integer minSize) |
void |
setPattern(String pattern) |
void |
setPrecision(Integer precision) |
void |
setScale(Integer scale) |
void |
setValueBasedOnDto(ParamDto dto)
set value based on dto
the value is basically obtained from evomaster core
|
void |
setValueBasedOnInstanceOrJson(Object json)
set value based on json
|
protected void |
setValueBasedOnValidInstance(Object instance)
set the value of the param based on instance
compared with [setValueBasedOnInstance], the type of the instance here is evaluated as valid
|
copyStructureWithProperties, getCandidateReferences, getCandidates, getDefaultValue, getName, getType, getValue, isHasDependentCandidates, isMutable, isNullable, isValidInstance, newAssertionWithJavaOrKotlin, newInstanceWithJavaOrKotlin, parseValueWithJson, sameParam, setCandidateReferences, setCandidates, setDefaultValue, setHasDependentCandidates, setMutable, setNullable, setValue, setValueBasedOnInstanceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleConstraintsInCopy, handleConstraintsInCopyDtopublic StringParam(String name, StringType type, AccessibleSchema accessibleSchema)
public StringParam(String name, AccessibleSchema accessibleSchema, JavaDtoSpec spec)
public Integer getMinSize()
public void setMinSize(Integer minSize)
public Integer getMaxSize()
public void setMaxSize(Integer maxSize)
public BigDecimal getMin()
getMin in interface NumericConstraintBase<BigDecimal>public void setMin(BigDecimal min)
setMin in interface NumericConstraintBase<BigDecimal>public BigDecimal getMax()
getMax in interface NumericConstraintBase<BigDecimal>public void setMax(BigDecimal max)
setMax in interface NumericConstraintBase<BigDecimal>public String getPattern()
public void setPattern(String pattern)
public Object newInstance()
newInstance in class NamedTypedValue<StringType,String>public List<String> referenceTypes()
referenceTypes in class NamedTypedValue<StringType,String>public StringParam copyStructure()
copyStructure in class NamedTypedValue<StringType,String>public void setValueBasedOnDto(ParamDto dto)
NamedTypedValuesetValueBasedOnDto in class NamedTypedValue<StringType,String>dto - contains value info with stringpublic void setValueBasedOnInstanceOrJson(Object json) throws com.fasterxml.jackson.core.JsonProcessingException
NamedTypedValuesetValueBasedOnInstanceOrJson in class NamedTypedValue<StringType,String>json - contains value info with json formatcom.fasterxml.jackson.core.JsonProcessingExceptionpublic ParamDto getDto()
NamedTypedValuegetDto in class NamedTypedValue<StringType,String>protected void setValueBasedOnValidInstance(Object instance)
NamedTypedValuesetValueBasedOnValidInstance in class NamedTypedValue<StringType,String>instance - is the instancepublic List<String> newInstanceWithJavaOrKotlin(boolean isDeclaration, boolean doesIncludeName, String variableName, int indent, boolean isJava, boolean isVariableNullable)
NamedTypedValuenewInstanceWithJavaOrKotlin in class NamedTypedValue<StringType,String>isDeclaration - specifies whether it is used to declare the instance (ie, with type name).doesIncludeName - specifies whether it is required to have the variable name
eg, if true, var = new instance(); if yes, new instance();variableName - specifies the name of variableindent - specifies the indent of this block of the codepublic List<String> newAssertionWithJavaOrKotlin(int indent, String responseVarName, int maxAssertionForDataInCollection, boolean isJava)
NamedTypedValuenewAssertionWithJavaOrKotlin in class NamedTypedValue<StringType,String>indent - specifies the current indent of the coderesponseVarName - a variable name for responsespublic String getValueAsJavaString(boolean isJava)
getValueAsJavaString in class NamedTypedValue<StringType,String>public void copyProperties(NamedTypedValue copy)
copyProperties in class NamedTypedValue<StringType,String>public boolean getMinInclusive()
getMinInclusive in interface NumericConstraintBase<BigDecimal>public void setMinInclusive(boolean inclusive)
setMinInclusive in interface NumericConstraintBase<BigDecimal>public boolean getMaxInclusive()
getMaxInclusive in interface NumericConstraintBase<BigDecimal>public void setMaxInclusive(boolean inclusive)
setMaxInclusive in interface NumericConstraintBase<BigDecimal>public Integer getPrecision()
getPrecision in interface NumericConstraintBase<BigDecimal>public void setPrecision(Integer precision)
setPrecision in interface NumericConstraintBase<BigDecimal>public Integer getScale()
getScale in interface NumericConstraintBase<BigDecimal>public void setScale(Integer scale)
setScale in interface NumericConstraintBase<BigDecimal>Copyright © 2016–2024. All rights reserved.