Closed as not planned
Description
@RunWith(Theories.class)
public class NonExistentTheory {
@DataPoints("foo")
public static final ImmutableSet<MetaSyntacticVariable> FOOS =
ImmutableSet.of(MetaSyntacticVariable.FOO);
@Theory
public void doWithTheFoo(@FromDataPoints("bar") MetaSyntacticVariable whatever) {
System.err.println(whatever);
}
@Theory
public void doWithTheBoolean(@FromDataPoints("bar") boolean whatever) {
System.err.println(whatever);
}
enum MetaSyntacticVariable {
FOO, BAR, BAZ
}
}
It is surprising that these @FromDataPoints
-annotated parameters receive the same values as if the annotation were omitted. This means that typos in data point names aren't flagged as errors.
If the @FromDataPoints
is present, and nothing matches, it would be helpful to raise "Never found parameters that satisfied method assumptions.".