Skip to content

Commit 3c8a3ae

Browse files
vogellaakurtakov
authored andcommitted
Migrate org.eclipse.ui.tests.forms from JUnit4 to JUnit5
- Convert @RunWith(Suite.class) to @suite - Convert @Suite.SuiteClasses to @SelectClasses - Update imports from org.junit.runners to org.junit.platform.suite.api - Add org.junit.jupiter.api and org.junit.platform.suite.api to Import-Package
1 parent 61a300b commit 3c8a3ae

File tree

7 files changed

+30
-26
lines changed

7 files changed

+30
-26
lines changed

tests/org.eclipse.ui.tests.forms/META-INF/MANIFEST.MF

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: Forms Test
44
Bundle-SymbolicName: org.eclipse.ui.tests.forms;singleton:=true
5-
Bundle-Version: 3.10.500.qualifier
5+
Bundle-Version: 3.10.600.qualifier
66
Require-Bundle: org.eclipse.ui,
77
org.eclipse.core.runtime,
88
org.eclipse.test.performance,
99
org.eclipse.ui.forms,
1010
org.junit
1111
Bundle-Vendor: Eclipse.org
12+
Import-Package: org.junit.jupiter.api,
13+
org.junit.platform.suite.api
1214
Bundle-RequiredExecutionEnvironment: JavaSE-17
1315
Eclipse-BundleShape: dir
1416
Automatic-Module-Name: org.eclipse.ui.tests.forms

tests/org.eclipse.ui.tests.forms/forms/org/eclipse/ui/tests/forms/AllFormsPerformanceTests.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@
1515
package org.eclipse.ui.tests.forms;
1616

1717
import org.eclipse.ui.tests.forms.performance.FormsPerformanceTest;
18-
import org.junit.runner.RunWith;
19-
import org.junit.runners.Suite;
18+
19+
import org.junit.platform.suite.api.SelectClasses;
20+
import org.junit.platform.suite.api.Suite;
2021

2122
/*
2223
* Tests forms performance (automated).
2324
*/
24-
@RunWith(Suite.class)
25-
@Suite.SuiteClasses({ FormsPerformanceTest.class })
25+
@Suite
26+
@SelectClasses({ FormsPerformanceTest.class })
2627
public class AllFormsPerformanceTests {
2728

2829
}

tests/org.eclipse.ui.tests.forms/forms/org/eclipse/ui/tests/forms/AllFormsTests.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@
2020
import org.eclipse.ui.tests.forms.layout.AllLayoutTests;
2121
import org.eclipse.ui.tests.forms.util.AllUtilityTests;
2222
import org.eclipse.ui.tests.forms.widgets.AllWidgetsTests;
23-
import org.junit.runner.RunWith;
24-
import org.junit.runners.Suite;
23+
24+
import org.junit.platform.suite.api.SelectClasses;
25+
import org.junit.platform.suite.api.Suite;
2526

2627
/**
2728
* Tests all forms functionality (automated).
2829
*/
29-
@RunWith(Suite.class)
30-
@Suite.SuiteClasses({
30+
@Suite
31+
@SelectClasses({
3132
AllEventsTests.class, //
3233
AllLayoutTests.class, //
3334
AllUtilityTests.class, //

tests/org.eclipse.ui.tests.forms/forms/org/eclipse/ui/tests/forms/events/AllEventsTests.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
package org.eclipse.ui.tests.forms.events;
22

3-
import org.junit.runner.RunWith;
4-
import org.junit.runners.Suite;
5-
import org.junit.runners.Suite.SuiteClasses;
3+
import org.junit.platform.suite.api.Suite;
4+
import org.junit.platform.suite.api.SelectClasses;
65

7-
@RunWith(Suite.class)
8-
@SuiteClasses({ ExpansionListenerTest.class, //
6+
@Suite
7+
@SelectClasses({ ExpansionListenerTest.class, //
98
HyperLinkListenerTest.class,//
109
})
1110
public class AllEventsTests {

tests/org.eclipse.ui.tests.forms/forms/org/eclipse/ui/tests/forms/layout/AllLayoutTests.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717

1818
import org.eclipse.ui.tests.forms.widgets.HintAdjustmentTest;
1919
import org.eclipse.ui.tests.forms.widgets.SizeCacheTest;
20-
import org.junit.runner.RunWith;
21-
import org.junit.runners.Suite;
20+
21+
import org.junit.platform.suite.api.SelectClasses;
22+
import org.junit.platform.suite.api.Suite;
2223

2324
/**
2425
* Test all form layouts
2526
*/
26-
@RunWith(Suite.class)
27-
@Suite.SuiteClasses({
27+
@Suite
28+
@SelectClasses({
2829
HintAdjustmentTest.class,
2930
SizeCacheTest.class,
3031
TestColumnWrapLayout.class,

tests/org.eclipse.ui.tests.forms/forms/org/eclipse/ui/tests/forms/util/AllUtilityTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
*******************************************************************************/
1515
package org.eclipse.ui.tests.forms.util;
1616

17-
import org.junit.runner.RunWith;
18-
import org.junit.runners.Suite;
17+
import org.junit.platform.suite.api.SelectClasses;
18+
import org.junit.platform.suite.api.Suite;
1919

2020
/**
2121
* Tests forms utility (automated).
2222
*/
23-
@RunWith(Suite.class)
24-
@Suite.SuiteClasses({
23+
@Suite
24+
@SelectClasses({
2525
FormColorsTest.class,
2626
FormFontsTest.class,
2727
FormImagesTest.class,

tests/org.eclipse.ui.tests.forms/forms/org/eclipse/ui/tests/forms/widgets/AllWidgetsTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
*******************************************************************************/
1414
package org.eclipse.ui.tests.forms.widgets;
1515

16-
import org.junit.runner.RunWith;
17-
import org.junit.runners.Suite;
16+
import org.junit.platform.suite.api.SelectClasses;
17+
import org.junit.platform.suite.api.Suite;
1818

1919
/**
2020
* Tests forms widgets (automated).
2121
*/
22-
@RunWith(Suite.class)
23-
@Suite.SuiteClasses({ ExpandableCompositeTest.class, FormTextModelTest.class, ScrolledFormTest.class })
22+
@Suite
23+
@SelectClasses({ ExpandableCompositeTest.class, FormTextModelTest.class, ScrolledFormTest.class })
2424
public class AllWidgetsTests {
2525

2626
}

0 commit comments

Comments
 (0)