junit4 icon indicating copy to clipboard operation
junit4 copied to clipboard

ParameterSignature class does not have getSupplierAnnotation() method

Open shubozhang opened this issue 10 years ago • 2 comments

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

shubozhang avatar Oct 14 '15 18:10 shubozhang

So tell us what the compiler says. I was using it without any problem.

Tibor17 avatar Oct 15 '15 20:10 Tibor17

cannot resolve method 'getSupplierAnnotation()'.

shubozhang avatar Oct 15 '15 20:10 shubozhang