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