File tree 1 file changed +0
-32
lines changed
src/main/java/com/google/testing/junit/testparameterinjector 1 file changed +0
-32
lines changed Original file line number Diff line number Diff line change 14
14
15
15
package com .google .testing .junit .testparameterinjector ;
16
16
17
- import com .google .common .collect .ImmutableList ;
18
17
import java .util .List ;
19
- import org .junit .rules .TestRule ;
20
- import org .junit .runner .Description ;
21
18
import org .junit .runners .model .InitializationError ;
22
- import org .junit .runners .model .Statement ;
23
19
24
20
/**
25
21
* A JUnit test runner which knows how to instantiate and run test classes where each test case may
@@ -33,36 +29,8 @@ public TestParameterInjector(Class<?> testClass) throws InitializationError {
33
29
super (testClass );
34
30
}
35
31
36
- @ Override
37
- protected List <TestRule > getInnerTestRules () {
38
- return ImmutableList .of (new TestNamePrinterRule ());
39
- }
40
-
41
32
@ Override
42
33
protected List <TestMethodProcessor > createTestMethodProcessorList () {
43
34
return TestMethodProcessors .createNewParameterizedProcessorsWithLegacyFeatures (getTestClass ());
44
35
}
45
-
46
- /** A {@link TestRule} that prints the current test name before and after the test. */
47
- private static final class TestNamePrinterRule implements TestRule {
48
-
49
- @ Override
50
- public Statement apply (final Statement originalStatement , final Description testDescription ) {
51
- return new Statement () {
52
- @ Override
53
- public void evaluate () throws Throwable {
54
- String testName =
55
- testDescription .getTestClass ().getSimpleName ()
56
- + "."
57
- + testDescription .getMethodName ();
58
- System .out .println ("\n \n Beginning test: " + testName );
59
- try {
60
- originalStatement .evaluate ();
61
- } finally {
62
- System .out .println ("\n End of test: " + testName );
63
- }
64
- }
65
- };
66
- }
67
- }
68
36
}
You can’t perform that action at this time.
0 commit comments