11/*******************************************************************************
2- * Copyright (c) 2024 Vector Informatik GmbH and others.
2+ * Copyright (c) 2024, 2025 Vector Informatik GmbH and others.
33 *
44 * This program and the accompanying materials
55 * are made available under the terms of the Eclipse Public License 2.0
1010 *******************************************************************************/
1111package org .eclipse .e4 .ui .workbench .addons .cleanupaddon ;
1212
13- import static org . junit . Assert . assertFalse ;
14- import static org .junit .Assert . assertTrue ;
15- import static org .junit .Assume . assumeFalse ;
13+
14+ import static org .junit .jupiter . api . Assertions . assertFalse ;
15+ import static org .junit .jupiter . api . Assertions . assertTrue ;
1616
1717import java .net .MalformedURLException ;
1818import java .net .URL ;
1919import java .time .Duration ;
2020import java .util .function .Supplier ;
2121
22- import org .eclipse .core .runtime .Platform .OS ;
2322import org .eclipse .e4 .core .contexts .ContextInjectionFactory ;
2423import org .eclipse .e4 .core .contexts .IEclipseContext ;
2524import org .eclipse .e4 .ui .di .UISynchronize ;
5655import org .eclipse .swt .graphics .Image ;
5756import org .eclipse .swt .widgets .Display ;
5857import org .eclipse .swt .widgets .Shell ;
59- import org .junit .After ;
60- import org .junit .Before ;
61- import org .junit .Test ;
58+ import org .junit .jupiter .api .AfterEach ;
59+ import org .junit .jupiter .api .BeforeEach ;
60+ import org .junit .jupiter .api .Test ;
61+ import org .junit .jupiter .api .condition .DisabledOnOs ;
62+ import org .junit .jupiter .api .condition .OS ;
6263
6364public class CleanupAddonTest {
6465 private static final Duration TIMEOUT = Duration .ofSeconds (30 );
@@ -74,12 +75,12 @@ public class CleanupAddonTest {
7475 private MTrimmedWindow window ;
7576 private IEclipseContext appContext ;
7677
77- @ Before
78+ @ BeforeEach
7879 public void before () {
7980 prepareApplicationModel ();
8081 }
8182
82- @ After
83+ @ AfterEach
8384 public void tearDown () {
8485 renderer .removeGui (window );
8586 renderer .stop ();
@@ -188,12 +189,10 @@ public Image adornImage(Image toAdorn, Image adornment) {
188189 shell = (Shell ) renderer .createGui (window );
189190 }
190191
192+ @ DisabledOnOs (value = { OS .MAC }, //
193+ disabledReason = "not working reliably on Mac, see https://github.com/eclipse-platform/eclipse.platform.ui/issues/1784" )
191194 @ Test
192195 public void testRemovingPrimaryDataStackTransfersToRemainingStack () {
193- assumeFalse (
194- "not working reliably on Mac, see https://github.com/eclipse-platform/eclipse.platform.ui/issues/1784" ,
195- OS .isMac ());
196-
197196 PartStackUtil .initializeAsPrimaryDataStack (partStack1 );
198197 assertTrue (PartStackUtil .isPrimaryDataStack (partStack1 ));
199198 assertFalse (PartStackUtil .isPrimaryDataStack (partStack2 ));
@@ -218,5 +217,4 @@ private static void waitForCondition(Supplier<Boolean> condition, Duration timeo
218217 Display .getCurrent ().readAndDispatch ();
219218 }
220219 }
221-
222220}
0 commit comments