public class BigDecimalParam extends NamedTypedValue<BigDecimalType,BigDecimal> implements NumericConstraintBase<BigDecimal>
accessibleSchema, objectMaper| Constructor and Description |
|---|
BigDecimalParam(String name,
AccessibleSchema accessibleSchema,
JavaDtoSpec spec) |
BigDecimalParam(String name,
BigDecimalType type,
AccessibleSchema accessibleSchema) |
| Modifier and Type | Method and Description |
|---|---|
void |
copyProperties(NamedTypedValue copy) |
NamedTypedValue<BigDecimalType,BigDecimal> |
copyStructure() |
ParamDto |
getDto()
get its dto format in order to further handle it with evomastr core
|
BigDecimal |
getMax() |
boolean |
getMaxInclusive() |
BigDecimal |
getMin() |
boolean |
getMinInclusive() |
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 |
setMin(BigDecimal min) |
void |
setMinInclusive(boolean inclusive) |
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 BigDecimalParam(String name, BigDecimalType type, AccessibleSchema accessibleSchema)
public BigDecimalParam(String name, AccessibleSchema accessibleSchema, JavaDtoSpec spec)
public Object newInstance() throws ClassNotFoundException
newInstance in class NamedTypedValue<BigDecimalType,BigDecimal>ClassNotFoundExceptionpublic NamedTypedValue<BigDecimalType,BigDecimal> copyStructure()
copyStructure in class NamedTypedValue<BigDecimalType,BigDecimal>public void copyProperties(NamedTypedValue copy)
copyProperties in class NamedTypedValue<BigDecimalType,BigDecimal>public void setValueBasedOnDto(ParamDto dto)
NamedTypedValuesetValueBasedOnDto in class NamedTypedValue<BigDecimalType,BigDecimal>dto - contains value info with stringpublic void setValueBasedOnInstanceOrJson(Object json) throws com.fasterxml.jackson.core.JsonProcessingException
NamedTypedValuesetValueBasedOnInstanceOrJson in class NamedTypedValue<BigDecimalType,BigDecimal>json - contains value info with json formatcom.fasterxml.jackson.core.JsonProcessingExceptionprotected void setValueBasedOnValidInstance(Object instance)
NamedTypedValuesetValueBasedOnValidInstance in class NamedTypedValue<BigDecimalType,BigDecimal>instance - is the instancepublic List<String> newInstanceWithJavaOrKotlin(boolean isDeclaration, boolean doesIncludeName, String variableName, int indent, boolean isJava, boolean isVariableNullable)
NamedTypedValuenewInstanceWithJavaOrKotlin in class NamedTypedValue<BigDecimalType,BigDecimal>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<BigDecimalType,BigDecimal>indent - specifies the current indent of the coderesponseVarName - a variable name for responsespublic ParamDto getDto()
NamedTypedValuegetDto in class NamedTypedValue<BigDecimalType,BigDecimal>public String getValueAsJavaString(boolean isJava)
getValueAsJavaString in class NamedTypedValue<BigDecimalType,BigDecimal>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 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>public List<String> referenceTypes()
referenceTypes in class NamedTypedValue<BigDecimalType,BigDecimal>Copyright © 2016–2025. All rights reserved.