use of org.evosuite.testcase.statements.ConstructorStatement in project evosuite by EvoSuite.
the class ReferenceLocalSearch method changeParameters.
/**
* Switch parameter/callee variables with other available objects
*
* @param test
* @param statement
* @return
*/
private boolean changeParameters(TestChromosome test, int statement) {
logger.debug("Changing parameters");
Statement stmt = test.getTestCase().getStatement(statement);
if (stmt instanceof MethodStatement) {
return replaceMethodParameter(test, (MethodStatement) stmt);
} else if (stmt instanceof ConstructorStatement) {
return replaceConstructorParameter(test, (ConstructorStatement) stmt);
} else if (stmt instanceof FieldStatement) {
return replaceFieldSource(test, (FieldStatement) stmt);
} else {
return false;
}
}
Aggregations