public class ObjectPool extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
protected Map<GenericClass,Set<TestCase>> |
pool
The actual object pool
|
| Constructor and Description |
|---|
ObjectPool() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSequence(GenericClass clazz,
TestCase sequence)
Insert a new sequence for given Type
|
protected void |
filterUnaccessibleTests() |
Set<GenericClass> |
getClasses() |
int |
getNumberOfClasses() |
int |
getNumberOfSequences() |
static ObjectPool |
getPoolFromFile(String fileName)
Read a serialized pool
|
static ObjectPool |
getPoolFromJUnit(GenericClass targetClass,
Class<?> testSuite)
Execute all tests in a JUnit test suite and add resulting sequences from
carver
|
static ObjectPool |
getPoolFromTestSuite(TestSuiteChromosome testSuite)
Convert a test suite to a pool
|
TestCase |
getRandomSequence(GenericClass clazz)
Randomly choose a sequence for a given Type
|
Set<TestCase> |
getSequences(GenericClass clazz)
Retrieve all possible sequences for a given Type
|
boolean |
hasSequence(GenericClass clazz)
Check if there are sequences for given Type
|
boolean |
isEmpty() |
void |
writePool(String fileName) |
protected final Map<GenericClass,Set<TestCase>> pool
protected static final org.slf4j.Logger logger
public void addSequence(GenericClass clazz, TestCase sequence)
public TestCase getRandomSequence(GenericClass clazz)
public Set<TestCase> getSequences(GenericClass clazz)
public Set<GenericClass> getClasses()
public boolean hasSequence(GenericClass clazz)
clazz - a Type object.public int getNumberOfClasses()
public int getNumberOfSequences()
public boolean isEmpty()
public static ObjectPool getPoolFromFile(String fileName)
fileName - protected void filterUnaccessibleTests()
public static ObjectPool getPoolFromTestSuite(TestSuiteChromosome testSuite)
testSuite - public static ObjectPool getPoolFromJUnit(GenericClass targetClass, Class<?> testSuite)
targetClass - testSuite - public void writePool(String fileName)
Copyright © 2010–2017 EvoSuite. All rights reserved.