junit4
junit4 copied to clipboard
Move test class validation aside
I am extending ParentRunner<?> with my own implementation using DI and the single constructor check is getting in the way:
public TestClass(Class> klass) {
fClass= klass;
if (klass != null && klass.getConstructors().length > 1)
throw new IllegalArgumentException(
"Test class can only have one constructor");
Could this be moved aside to a protected validateXXX method or even move it up to BlockJUnit4ClassRunner?