public abstract class Contract extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Contract.Pair<T> |
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
Contract() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addAssertionAndComments(Statement statement,
List<VariableReference> variables,
Throwable exception)
Add an assertion to the statement based on the contract.
|
void |
changeClassLoader(ClassLoader classLoader) |
abstract ContractViolation |
check(Statement statement,
Scope scope,
Throwable exception)
Check the contract on the current statement in the current scope
|
boolean |
fails(TestCase test)
Run the test against this contract and determine whether it reports a
failure
|
protected Collection<Contract.Pair<Object>> |
getAllObjectPairs(Scope scope)
getAllObjectPairs
|
protected Collection<Object> |
getAllObjects(Scope scope)
getAllObjects
|
protected Collection<Contract.Pair<VariableReference>> |
getAllVariablePairs(Scope scope) |
protected Collection<VariableReference> |
getAllVariables(Scope scope) |
protected boolean |
isTargetStatement(Statement statement)
Check if this statement is related to the unit under test
|
protected Collection<Object> getAllObjects(Scope scope)
getAllObjects
scope - a Scope object.Collection object.protected Collection<VariableReference> getAllVariables(Scope scope)
protected Collection<Contract.Pair<Object>> getAllObjectPairs(Scope scope)
getAllObjectPairs
scope - a Scope object.Collection object.protected Collection<Contract.Pair<VariableReference>> getAllVariablePairs(Scope scope)
protected boolean isTargetStatement(Statement statement)
statement - a Statement object.public boolean fails(TestCase test)
test - a TestCase object.public abstract ContractViolation check(Statement statement, Scope scope, Throwable exception)
public abstract void addAssertionAndComments(Statement statement, List<VariableReference> variables, Throwable exception)
statement - variables - exception - public void changeClassLoader(ClassLoader classLoader)
Copyright © 2010–2017 EvoSuite. All rights reserved.