diff --git a/src/main/java/org/junit/runners/BlockJUnit4ClassRunner.java b/src/main/java/org/junit/runners/BlockJUnit4ClassRunner.java index 4d06199164e8..f9b418911fad 100644 --- a/src/main/java/org/junit/runners/BlockJUnit4ClassRunner.java +++ b/src/main/java/org/junit/runners/BlockJUnit4ClassRunner.java @@ -217,6 +217,14 @@ protected Object createTest() throws Exception { return getTestClass().getOnlyConstructor().newInstance(); } + /** + * Returns a new fixture to run a particular test {@code method} against. + * Default implementation executes the no-argument {@link #createTest()} method. + */ + protected Object createTest(FrameworkMethod method) throws Exception { + return createTest(); + } + /** * Returns the name that describes {@code method} for {@link Description}s. * Default implementation is the method's name @@ -232,7 +240,7 @@ protected String testName(FrameworkMethod method) { * Here is an outline of the default implementation: * *