junit4
junit4 copied to clipboard
ParameterSignature class does not have getSupplierAnnotation() method
I was running @Theory examples and found the following code cannot pass compilation.
public static class BetweenSupplier extends ParameterSupplier {
@Override
public List<PotentialAssignment> getValueSources(ParameterSignature sig) {
List<PotentialAssignment> list = new ArrayList<PotentialAssignment>();
Between annotation = (Between) sig.getSupplierAnnotation(); // cannot resolve method
for (int i = annotation.first(); i <= annotation.last(); i++)
list.add(PotentialAssignment.forValue("ints", i));
return list;
}
}
Doc: http://junit.org/apidocs/org/junit/experimental/theories/ParameterSupplier.html
So tell us what the compiler says. I was using it without any problem.
cannot resolve method 'getSupplierAnnotation()'.