1
1
/*******************************************************************************
2
- * Copyright (c) 2024 Vector Informatik GmbH and others.
2
+ * Copyright (c) 2024, 2025 Vector Informatik GmbH and others.
3
3
*
4
4
* This program and the accompanying materials
5
5
* are made available under the terms of the Eclipse Public License 2.0
10
10
*******************************************************************************/
11
11
package org .eclipse .e4 .ui .workbench .addons .cleanupaddon ;
12
12
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 ;
16
16
17
17
import java .net .MalformedURLException ;
18
18
import java .net .URL ;
19
19
import java .time .Duration ;
20
20
import java .util .function .Supplier ;
21
21
22
- import org .eclipse .core .runtime .Platform .OS ;
23
22
import org .eclipse .e4 .core .contexts .ContextInjectionFactory ;
24
23
import org .eclipse .e4 .core .contexts .IEclipseContext ;
25
24
import org .eclipse .e4 .ui .di .UISynchronize ;
56
55
import org .eclipse .swt .graphics .Image ;
57
56
import org .eclipse .swt .widgets .Display ;
58
57
import 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 ;
62
63
63
64
public class CleanupAddonTest {
64
65
private static final Duration TIMEOUT = Duration .ofSeconds (30 );
@@ -74,12 +75,12 @@ public class CleanupAddonTest {
74
75
private MTrimmedWindow window ;
75
76
private IEclipseContext appContext ;
76
77
77
- @ Before
78
+ @ BeforeEach
78
79
public void before () {
79
80
prepareApplicationModel ();
80
81
}
81
82
82
- @ After
83
+ @ AfterEach
83
84
public void tearDown () {
84
85
renderer .removeGui (window );
85
86
renderer .stop ();
@@ -188,12 +189,10 @@ public Image adornImage(Image toAdorn, Image adornment) {
188
189
shell = (Shell ) renderer .createGui (window );
189
190
}
190
191
192
+ @ DisabledOnOs (value = { OS .MAC }, //
193
+ disabledReason = "not working reliably on Mac, see https://github.com/eclipse-platform/eclipse.platform.ui/issues/1784" )
191
194
@ Test
192
195
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
-
197
196
PartStackUtil .initializeAsPrimaryDataStack (partStack1 );
198
197
assertTrue (PartStackUtil .isPrimaryDataStack (partStack1 ));
199
198
assertFalse (PartStackUtil .isPrimaryDataStack (partStack2 ));
@@ -218,5 +217,4 @@ private static void waitForCondition(Supplier<Boolean> condition, Duration timeo
218
217
Display .getCurrent ().readAndDispatch ();
219
218
}
220
219
}
221
-
222
220
}
0 commit comments