File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
net.sourceforge.pmd.eclipse.plugin.test/src/main/java/net/sourceforge/pmd/eclipse Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3+ */
4+
5+ package net .sourceforge .pmd .eclipse ;
6+
7+ import org .junit .rules .TestWatcher ;
8+ import org .junit .runner .Description ;
9+ import org .slf4j .Logger ;
10+ import org .slf4j .LoggerFactory ;
11+
12+ public class LoggingRule extends TestWatcher {
13+
14+ @ Override
15+ protected void starting (Description description ) {
16+ final Logger LOG = LoggerFactory .getLogger (description .getClassName ());
17+ LOG .debug ("\n *\n *\n * Starting test {}\n *\n *\n *" , description .getMethodName ());
18+ }
19+
20+ @ Override
21+ protected void finished (Description description ) {
22+ final Logger LOG = LoggerFactory .getLogger (description .getClassName ());
23+ LOG .debug ("\n *\n *\n * Finished test {}\n *\n *\n *" , description .getMethodName ());
24+ }
25+ }
Original file line number Diff line number Diff line change 3030import net .sourceforge .pmd .Rule ;
3131import net .sourceforge .pmd .RuleSet ;
3232import net .sourceforge .pmd .eclipse .EclipseUtils ;
33+ import net .sourceforge .pmd .eclipse .LoggingRule ;
3334import net .sourceforge .pmd .eclipse .plugin .PMDPlugin ;
3435import net .sourceforge .pmd .eclipse .runtime .PMDRuntimeConstants ;
3536import net .sourceforge .pmd .eclipse .runtime .preferences .IPreferences ;
4546public class ReviewCmdTest {
4647 private IProject testProject ;
4748
49+ @ org .junit .Rule
50+ public LoggingRule loggingRule = new LoggingRule ();
51+
4852 @ Before
4953 public void setUp () throws Exception {
5054
You can’t perform that action at this time.
0 commit comments