File tree 2 files changed +16
-4
lines changed
src/test/java/org/junit/rules
2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 22
22
TestRuleTest .class ,
23
23
TestWatcherTest .class ,
24
24
TestWatchmanTest .class ,
25
- // todo TestWatchmanTest.class, - doesn't work and wasn't being run before.
25
+ TestWatchmanTest .class ,
26
26
TimeoutRuleTest .class ,
27
27
VerifierRuleTest .class
28
28
})
Original file line number Diff line number Diff line change 5
5
import static org .junit .Assert .assertThat ;
6
6
import static org .junit .Assume .assumeTrue ;
7
7
import static org .junit .runner .JUnitCore .runClasses ;
8
-
8
+ import org . junit . BeforeClass ;
9
9
import org .junit .Rule ;
10
10
import org .junit .Test ;
11
11
import org .junit .runners .model .FrameworkMethod ;
12
12
13
13
@ SuppressWarnings ("deprecation" )
14
14
public class TestWatchmanTest {
15
15
public static class ViolatedAssumptionTest {
16
- static StringBuilder log = new StringBuilder ();
16
+ static StringBuilder log ;
17
+
18
+ @ BeforeClass
19
+ public static void initLog () {
20
+ log = new StringBuilder ();
21
+ }
22
+
17
23
@ Rule
18
24
public LoggingTestWatchman watchman = new LoggingTestWatchman (log );
19
25
@@ -31,7 +37,13 @@ public void neitherLogSuccessNorFailedForViolatedAssumption() {
31
37
}
32
38
33
39
public static class FailingTest {
34
- static StringBuilder log = new StringBuilder ();
40
+ static StringBuilder log ;
41
+
42
+ @ BeforeClass
43
+ public static void initLog () {
44
+ log = new StringBuilder ();
45
+ }
46
+
35
47
@ Rule
36
48
public LoggingTestWatchman watchman = new LoggingTestWatchman (log );
37
49
You can’t perform that action at this time.
0 commit comments