public abstract class Assertion extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected String |
comment
Assertion Comment
|
protected Set<Mutation> |
killedMutants |
protected static org.slf4j.Logger |
logger
Constant
logger |
protected VariableReference |
source
Variable on which the assertion is made
|
protected Statement |
statement
Statement to which the assertion is added
|
protected Object |
value
Expected value of variable
|
| Constructor and Description |
|---|
Assertion() |
| Modifier and Type | Method and Description |
|---|---|
void |
addKilledMutation(Mutation m) |
void |
changeClassLoader(ClassLoader loader) |
Assertion |
clone()
Return a copy of the assertion
|
Assertion |
clone(TestCase newTestCase)
Return a copy of the assertion, which is valid in newTestCase
|
abstract Assertion |
copy(TestCase newTestCase,
int offset)
Return a copy of the assertion, which is valid in newTestCase
|
boolean |
equals(Object obj) |
abstract boolean |
evaluate(Scope scope)
Determine if assertion holds in current scope
|
abstract String |
getCode()
This method returns the Java Code
|
String |
getComment() |
Set<Mutation> |
getKilledMutations() |
Set<VariableReference> |
getReferencedVariables()
Return all the variables that are part of this assertion
|
VariableReference |
getSource()
Getter for source variable
|
Statement |
getStatement()
Getter for statement to which assertion is added
|
Object |
getValue()
Getter for value object
|
boolean |
hasComment() |
int |
hashCode() |
boolean |
isValid()
Self-check
|
void |
setComment(String comment) |
void |
setSource(VariableReference var) |
void |
setStatement(Statement statement)
Setter for statement to which assertion is added
|
void |
setValue(Object value) |
protected VariableReference source
protected Object value
protected Statement statement
protected String comment
protected static final org.slf4j.Logger logger
loggerpublic boolean hasComment()
public void setComment(String comment)
public String getComment()
public void addKilledMutation(Mutation m)
public void setStatement(Statement statement)
statement - a Statement object.public Statement getStatement()
Statement object.public VariableReference getSource()
VariableReference object.public void setSource(VariableReference var)
public void setValue(Object value)
public abstract String getCode()
String object.public final Assertion clone()
public Assertion clone(TestCase newTestCase)
public abstract Assertion copy(TestCase newTestCase, int offset)
public abstract boolean evaluate(Scope scope)
scope - The scope of the test case executionpublic Set<VariableReference> getReferencedVariables()
Set object.public boolean isValid()
public void changeClassLoader(ClassLoader loader)
Copyright © 2010–2017 EvoSuite. All rights reserved.