public abstract class PrimitiveOrWrapperParam<V> extends NamedTypedValue<PrimitiveOrWrapperType,V> implements NumericConstraintBase<BigDecimal>
accessibleSchema, objectMaper| Constructor and Description |
|---|
PrimitiveOrWrapperParam(String name,
PrimitiveOrWrapperType type,
AccessibleSchema accessibleSchema) |
PrimitiveOrWrapperParam(String name,
String type,
String fullTypeName,
Class<?> clazz,
AccessibleSchema accessibleSchema,
JavaDtoSpec spec) |
| Modifier and Type | Method and Description |
|---|---|
static PrimitiveOrWrapperParam |
build(String name,
Class<?> clazz,
AccessibleSchema accessibleSchema,
JavaDtoSpec spec) |
String |
castValueInTestGenerationIfNeeded(String stringValue,
boolean isJava) |
boolean |
castValueWithSpecificMethod(boolean isJava) |
Object |
convertValueTo(Object value) |
void |
copyProperties(NamedTypedValue copy) |
String |
getCastType() |
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() |
static Type |
getPrimitiveOrWrapper(Type type)
setter might not use exact same type for primitive type
|
String |
getPrimitiveValueInAssertion(String responseVarName,
boolean isJava) |
Integer |
getScale() |
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
|
abstract String |
primitiveValueMethod(boolean isJava) |
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
|
abstract void |
setValueBasedOnStringValue(String stringValue) |
copyStructure, copyStructureWithProperties, getCandidateReferences, getCandidates, getDefaultValue, getName, getType, getValue, getValueAsJavaString, isHasDependentCandidates, isMutable, isNullable, isValidInstance, newAssertionWithJavaOrKotlin, newInstanceWithJavaOrKotlin, parseValueWithJson, sameParam, setCandidateReferences, setCandidates, setDefaultValue, setHasDependentCandidates, setMutable, setNullable, setValue, setValueBasedOnInstance, setValueBasedOnInstanceOrJson, setValueBasedOnValidInstanceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleConstraintsInCopy, handleConstraintsInCopyDtopublic PrimitiveOrWrapperParam(String name, String type, String fullTypeName, Class<?> clazz, AccessibleSchema accessibleSchema, JavaDtoSpec spec)
public PrimitiveOrWrapperParam(String name, PrimitiveOrWrapperType type, AccessibleSchema accessibleSchema)
public static PrimitiveOrWrapperParam build(String name, Class<?> clazz, AccessibleSchema accessibleSchema, JavaDtoSpec spec)
public static Type getPrimitiveOrWrapper(Type type)
type - public ParamDto getDto()
NamedTypedValuegetDto in class NamedTypedValue<PrimitiveOrWrapperType,V>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 Object newInstance()
newInstance in class NamedTypedValue<PrimitiveOrWrapperType,V>public List<String> newInstanceWithJavaOrKotlin(boolean isDeclaration, boolean doesIncludeName, String variableName, int indent, boolean isJava, boolean isVariableNullable)
NamedTypedValuenewInstanceWithJavaOrKotlin in class NamedTypedValue<PrimitiveOrWrapperType,V>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<PrimitiveOrWrapperType,V>indent - specifies the current indent of the coderesponseVarName - a variable name for responsespublic void setValueBasedOnDto(ParamDto dto)
NamedTypedValuesetValueBasedOnDto in class NamedTypedValue<PrimitiveOrWrapperType,V>dto - contains value info with stringpublic abstract void setValueBasedOnStringValue(String stringValue)
public String getPrimitiveValueInAssertion(String responseVarName, boolean isJava)
responseVarName - refers to the variable name in responseisJava - public void copyProperties(NamedTypedValue copy)
copyProperties in class NamedTypedValue<PrimitiveOrWrapperType,V>public boolean castValueWithSpecificMethod(boolean isJava)
public String castValueInTestGenerationIfNeeded(String stringValue, boolean isJava)
public String getCastType()
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<PrimitiveOrWrapperType,V>public abstract String primitiveValueMethod(boolean isJava)
Copyright © 2016–2023. All rights reserved.