1515
1616package org .eclipse .e4 .ui .tests .workbench ;
1717
18- import static org .junit .Assert .assertEquals ;
19- import static org .junit .Assert .assertFalse ;
20- import static org .junit .Assert .assertNotEquals ;
21- import static org .junit .Assert .assertNotNull ;
22- import static org .junit .Assert .assertNull ;
23- import static org .junit .Assert .assertTrue ;
24- import static org .junit .Assert .fail ;
25- import static org .junit .Assume .assumeFalse ;
18+ import static org .junit .jupiter . api . Assertions .assertEquals ;
19+ import static org .junit .jupiter . api . Assertions .assertFalse ;
20+ import static org .junit .jupiter . api . Assertions .assertNotEquals ;
21+ import static org .junit .jupiter . api . Assertions .assertNotNull ;
22+ import static org .junit .jupiter . api . Assertions .assertNull ;
23+ import static org .junit .jupiter . api . Assertions .assertTrue ;
24+ import static org .junit .jupiter . api . Assertions .fail ;
25+ import static org .junit .jupiter . api . Assumptions .assumeFalse ;
2626
2727import jakarta .inject .Inject ;
2828import org .eclipse .core .runtime .Platform ;
3737import org .eclipse .e4 .ui .model .application .ui .menu .MMenu ;
3838import org .eclipse .e4 .ui .model .application .ui .menu .MMenuItem ;
3939import org .eclipse .e4 .ui .services .IServiceConstants ;
40- import org .eclipse .e4 .ui .tests .rules .WorkbenchContextRule ;
40+ import org .eclipse .e4 .ui .tests .rules .WorkbenchContextExtension ;
4141import org .eclipse .e4 .ui .workbench .modeling .EModelService ;
4242import org .eclipse .jface .action .MenuManager ;
4343import org .eclipse .swt .SWT ;
5151import org .eclipse .swt .widgets .Tree ;
5252import org .eclipse .swt .widgets .Widget ;
5353import org .eclipse .ui .tests .harness .util .DisplayHelper ;
54- import org .junit .Ignore ;
55- import org .junit .Rule ;
56- import org .junit .Test ;
54+ import org .junit .jupiter . api . Disabled ;
55+ import org .junit .jupiter . api . Test ;
56+ import org .junit .jupiter . api . extension . RegisterExtension ;
5757
5858public class MWindowTest {
5959
60- @ Rule
61- public WorkbenchContextRule contextRule = new WorkbenchContextRule ();
60+ @ RegisterExtension
61+ public WorkbenchContextExtension contextRule = new WorkbenchContextExtension ();
6262
6363 @ Inject
6464 private IEclipseContext appContext ;
@@ -71,7 +71,7 @@ public class MWindowTest {
7171
7272 @ Test
7373 public void testCreateWindow () {
74- assumeFalse ("Test fails on Mac: Bug 537639" , Platform . OS_MACOSX . equals ( Platform . getOS ()) );
74+ assumeFalse (Platform . OS_MACOSX . equals ( Platform . getOS ()), "Test fails on Mac: Bug 537639" );
7575
7676 final MWindow window = ems .createModelElement (MWindow .class );
7777 window .setLabel ("MyWindow" );
@@ -147,7 +147,7 @@ public void testCreateView() {
147147
148148 @ Test
149149 public void testContextChildren () {
150- assumeFalse ("Test fails on Mac: Bug 537639" , Platform . OS_MACOSX . equals ( Platform . getOS ()) );
150+ assumeFalse (Platform . OS_MACOSX . equals ( Platform . getOS ()), "Test fails on Mac: Bug 537639" );
151151
152152 final MWindow window = createWindowWithOneView ();
153153
@@ -250,7 +250,7 @@ public void testWindow_Name() {
250250 assertEquals ("windowName2" , shell .getText ());
251251 }
252252
253- @ Ignore
253+ @ Disabled
254254 @ Test
255255 public void TODOtestWindow_X () {
256256 final MWindow window = ems .createModelElement (MWindow .class );
@@ -283,7 +283,7 @@ public void TODOtestWindow_X() {
283283 assertEquals (300 , bounds .x );
284284 }
285285
286- @ Ignore
286+ @ Disabled
287287 @ Test
288288 public void TODOtestWindow_Y () {
289289 final MWindow window = ems .createModelElement (MWindow .class );
@@ -387,22 +387,22 @@ public void testDetachedWindow() {
387387 Shell topShell = (Shell ) window .getWidget ();
388388 Shell detachedShell = (Shell ) detachedWindow .getWidget ();
389389 assertEquals (window , ems .getContainer (detachedWindow ));
390- assertNull ("Should have no shell image" , topShell . getImage () );
391- assertEquals ("Detached should have same image" , topShell .getImage (), detachedShell .getImage ());
390+ assertNull (topShell . getImage (), "Should have no shell image" );
391+ assertEquals (topShell .getImage (), detachedShell .getImage (), "Detached should have same image" );
392392
393393 // now set icon on top-level window; detached window should inherit it
394394 window .setIconURI ("platform:/plugin/org.eclipse.e4.ui.tests/icons/filenav_nav.svg" );
395395 while (topShell .getDisplay ().readAndDispatch ()) {
396396 }
397- assertNotNull ("Should have shell image" , topShell . getImage () );
398- assertEquals ("Detached should have same image" , topShell .getImage (), detachedShell .getImage ());
397+ assertNotNull (topShell . getImage (), "Should have shell image" );
398+ assertEquals (topShell .getImage (), detachedShell .getImage (), "Detached should have same image" );
399399
400400 // change top-level icon; detached window should inherit it
401401 window .setIconURI (null );
402402 while (topShell .getDisplay ().readAndDispatch ()) {
403403 }
404- assertNull ("Should have no shell image" , topShell . getImage () );
405- assertEquals ("Detached should have same image" , topShell .getImage (), detachedShell .getImage ());
404+ assertNull (topShell . getImage (), "Should have no shell image" );
405+ assertEquals (topShell .getImage (), detachedShell .getImage (), "Detached should have same image" );
406406
407407 // turn detached into top-level window; inherited icon should be removed
408408 window .setIconURI ("platform:/plugin/org.eclipse.e4.ui.tests/icons/filenav_nav.svg" );
0 commit comments