Commit a4a2fde 1 parent 8a8979f commit a4a2fde Copy full SHA for a4a2fde
File tree 4 files changed +15
-30
lines changed
org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench
org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests
4 files changed +15
-30
lines changed Original file line number Diff line number Diff line change 71
71
import org .junit .Rule ;
72
72
import org .junit .Test ;
73
73
import org .junit .rules .TestName ;
74
+ import org .junit .rules .TestWatcher ;
74
75
import org .osgi .service .log .LogLevel ;
75
76
import org .osgi .service .log .LogListener ;
76
77
import org .osgi .service .log .LogReaderService ;
@@ -2972,6 +2973,9 @@ public void testBug371100() {
2972
2973
assertFalse (logged );
2973
2974
}
2974
2975
2976
+ @ Rule
2977
+ public TestWatcher screenshotRule = Screenshots .onFailure ();
2978
+
2975
2979
@ Test
2976
2980
public void testBug372226 () {
2977
2981
assumeFalse ("Test fails on Mac: Bug 537639" , Platform .OS_MACOSX .equals (Platform .getOS ()));
@@ -2991,8 +2995,6 @@ public void testBug372226() {
2991
2995
Control control = (Control ) part .getWidget ();
2992
2996
assertEquals (subShell , control .getParent ());
2993
2997
2994
- Screenshots .takeScreenshot (getClass (), testName .getMethodName ());
2995
-
2996
2998
appContext .get (EPartService .class ).activate (part );
2997
2999
assertEquals (subShell , control .getParent ());
2998
3000
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 28
28
import org .junit .Assume ;
29
29
import org .junit .Rule ;
30
30
import org .junit .Test ;
31
+ import org .junit .rules .TestWatcher ;
32
+
33
+ import org .eclipse .test .Screenshots ;
31
34
32
35
import org .eclipse .swt .SWT ;
33
36
import org .eclipse .swt .custom .StyledText ;
73
76
*/
74
77
public class TextViewerTest {
75
78
76
- @ Rule public ScreenshotOnFailureRule screenshotRule = new ScreenshotOnFailureRule ();
79
+ @ Rule
80
+ public TestWatcher screenshotRule = Screenshots .onFailure ();
81
+
77
82
private Shell fShell ;
78
83
79
84
@ After
Original file line number Diff line number Diff line change 25
25
import org .junit .Before ;
26
26
import org .junit .Rule ;
27
27
import org .junit .Test ;
28
+ import org .junit .rules .TestWatcher ;
29
+
30
+ import org .eclipse .test .Screenshots ;
28
31
29
32
import org .eclipse .swt .SWT ;
30
33
import org .eclipse .swt .custom .StyleRange ;
57
60
import org .eclipse .jface .text .source .AnnotationModel ;
58
61
import org .eclipse .jface .text .source .AnnotationPainter ;
59
62
import org .eclipse .jface .text .source .SourceViewer ;
60
- import org .eclipse .jface .text .tests .ScreenshotOnFailureRule ;
61
63
import org .eclipse .jface .text .tests .TextViewerTest ;
62
64
import org .eclipse .jface .text .tests .util .DisplayHelper ;
63
65
@@ -66,7 +68,8 @@ public class CodeMiningTest {
66
68
private SourceViewer fViewer ;
67
69
private Shell fShell ;
68
70
69
- @ Rule public ScreenshotOnFailureRule rule = new ScreenshotOnFailureRule ();
71
+ @ Rule
72
+ public TestWatcher screenshotRule = Screenshots .onFailure ();
70
73
71
74
@ Before
72
75
public void setUp () {
You can’t perform that action at this time.
0 commit comments