public abstract class CompareEquivalentFunctions extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Method |
methodTest |
protected Method |
methodValidation |
| Modifier | Constructor and Description |
|---|---|
protected |
CompareEquivalentFunctions(Class<?> testClass,
Class<?> validationClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
compareMethod(Method target,
String validationName)
Allows directly comparing two functions to each other without going through all the other functions
|
protected abstract void |
compareResults(Object targetResult,
Object[] targetParam,
Object validationResult,
Object[] validationParam)
Compares the two sets of results from the target and validation methods.
|
protected abstract Object[][] |
createInputParam(Method candidate,
Method validation)
Creates the set of input parameters for the functions.
|
protected Object[] |
createSubImageInputs(Object[] param) |
protected abstract boolean |
isEquivalent(Method candidate,
Method validation)
Returns two if the two methods provide results that should be compared
|
protected abstract boolean |
isTestMethod(Method m)
Checks to see if the provided method from the test class is a method that should be tested
|
void |
performTests(int numMethods) |
protected abstract Object[] |
reformatForValidation(Method m,
Object[] targetParam)
Adjusts the input for the validation method.
|
protected Method methodTest
protected Method methodValidation
public void performTests(int numMethods)
public void compareMethod(Method target, String validationName)
target - The method being comparedvalidationName - Name of the method in the validation classprotected abstract boolean isTestMethod(Method m)
protected abstract boolean isEquivalent(Method candidate, Method validation)
protected abstract Object[][] createInputParam(Method candidate, Method validation)
protected abstract Object[] reformatForValidation(Method m, Object[] targetParam)
Copyright © 2013. All Rights Reserved.