public abstract class GenericTests<T extends Number> {
protected abstract T getT();
@Test public void test1() {
getT();
}
}
public class ConcreteTests1 extends GenericTests<Integer> { ... }
public class ConcreteTests2 extends GenericTests<Double> { ... }
No tests are executed at all, both concrete classes are ignored. How do I make it work? (I expect test1() to be executed for both Integer and Double).
I use JUnit 4.8.1.
Update: it appeared that problem is related with maven-surefire-plugin and not JUnit itself. See my answer below.
Renamed all my classes to have suffix "Test" and now it works (
Concrete1Test,Concrete2Test).Update:
That's related with default settings of maven-surefire-plugin.
http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion-exclusion.html