Skip to content

Commit b941407

Browse files
committed
Move o.e.ui.tests.browser to JUnit 5
1 parent 6712af7 commit b941407

File tree

11 files changed

+36
-37
lines changed

11 files changed

+36
-37
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Bundle-Version: 3.5.0
66
Bundle-Vendor: %Plugin.providerName
77
Export-Package: org.eclipse.ui.tests.browser.internal
88
Require-Bundle: org.eclipse.core.runtime,
9-
org.junit,
109
org.eclipse.ui;bundle-version="3.208.0",
1110
org.eclipse.ui.browser
1211
Import-Package: org.junit.jupiter.api;version="[5.14.0,6.0.0)",

tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/DialogsTestCase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2004, 2005 IBM Corporation and others.
2+
* Copyright (c) 2004, 2026 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -16,7 +16,7 @@
1616
import org.eclipse.swt.widgets.Shell;
1717
import org.eclipse.ui.PlatformUI;
1818
import org.eclipse.ui.internal.browser.BrowserDescriptorDialog;
19-
import org.junit.Test;
19+
import org.junit.jupiter.api.Test;
2020

2121
public class DialogsTestCase {
2222
private Shell getShell() {

tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/ExistenceTestCase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2004, 2017 IBM Corporation and others.
2+
* Copyright (c) 2004, 2026 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -13,10 +13,10 @@
1313
*******************************************************************************/
1414
package org.eclipse.ui.tests.browser.internal;
1515

16-
import static org.junit.Assert.assertNotNull;
16+
import static org.junit.jupiter.api.Assertions.assertNotNull;
1717

1818
import org.eclipse.ui.internal.browser.WebBrowserUIPlugin;
19-
import org.junit.Test;
19+
import org.junit.jupiter.api.Test;
2020

2121
public class ExistenceTestCase {
2222
@Test

tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/ExternalBrowserTestCase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2004, 2025 IBM Corporation and others.
2+
* Copyright (c) 2004, 2026 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@
1919
import org.eclipse.ui.browser.IWebBrowser;
2020
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
2121
import org.eclipse.ui.internal.browser.WebBrowserPreference;
22-
import org.junit.Test;
22+
import org.junit.jupiter.api.Test;
2323

2424
public class ExternalBrowserTestCase {
2525
@Test

tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/InternalBrowserEditorTestCase.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2004, 2025 IBM Corporation and others.
2+
* Copyright (c) 2004, 2026 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -13,8 +13,9 @@
1313
*******************************************************************************/
1414
package org.eclipse.ui.tests.browser.internal;
1515

16-
import static org.junit.Assert.assertEquals;
17-
import static org.junit.Assert.assertNotNull;
16+
17+
import static org.junit.jupiter.api.Assertions.assertEquals;
18+
import static org.junit.jupiter.api.Assertions.assertNotNull;
1819

1920
import java.net.URI;
2021

@@ -26,7 +27,7 @@
2627
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
2728
import org.eclipse.ui.internal.browser.WebBrowserEditorInput;
2829
import org.eclipse.ui.internal.browser.WebBrowserPreference;
29-
import org.junit.Test;
30+
import org.junit.jupiter.api.Test;
3031

3132
public class InternalBrowserEditorTestCase {
3233
protected Shell shell;

tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/InternalBrowserViewTestCase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2004, 2025 IBM Corporation and others.
2+
* Copyright (c) 2004, 2026 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -21,7 +21,7 @@
2121
import org.eclipse.ui.browser.IWebBrowser;
2222
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
2323
import org.eclipse.ui.internal.browser.WebBrowserPreference;
24-
import org.junit.Test;
24+
import org.junit.jupiter.api.Test;
2525

2626
public class InternalBrowserViewTestCase {
2727
protected Shell shell;

tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/PreferencesTestCase.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2017 IBM Corporation and others.
2+
* Copyright (c) 2000, 2026 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -14,8 +14,7 @@
1414
package org.eclipse.ui.tests.browser.internal;
1515

1616
import org.eclipse.jface.dialogs.Dialog;
17-
import org.junit.Test;
18-
17+
import org.junit.jupiter.api.Test;
1918

2019
public class PreferencesTestCase {
2120

tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/TestInput.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2009, 2025 IBM Corporation and others.
2+
* Copyright (c) 2009, 2026 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -14,17 +14,17 @@
1414

1515
package org.eclipse.ui.tests.browser.internal;
1616

17-
import static org.junit.Assert.assertEquals;
18-
import static org.junit.Assert.assertNotEquals;
19-
import static org.junit.Assert.assertNotNull;
17+
import static org.junit.jupiter.api.Assertions.assertEquals;
18+
import static org.junit.jupiter.api.Assertions.assertNotEquals;
19+
import static org.junit.jupiter.api.Assertions.assertNotNull;
2020

2121
import java.net.MalformedURLException;
2222
import java.net.URI;
2323
import java.net.URISyntaxException;
2424

2525
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
2626
import org.eclipse.ui.internal.browser.WebBrowserEditorInput;
27-
import org.junit.Test;
27+
import org.junit.jupiter.api.Test;
2828

2929
public class TestInput {
3030

tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/ToolbarBrowserTestCase.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2005 IBM Corporation and others.
2+
* Copyright (c) 2005, 2026 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -13,8 +13,8 @@
1313
*******************************************************************************/
1414
package org.eclipse.ui.tests.browser.internal;
1515

16-
import static org.junit.Assert.assertNotNull;
17-
import static org.junit.Assert.assertTrue;
16+
import static org.junit.jupiter.api.Assertions.assertNotNull;
17+
import static org.junit.jupiter.api.Assertions.assertTrue;
1818

1919
import org.eclipse.jface.dialogs.Dialog;
2020
import org.eclipse.swt.layout.GridData;
@@ -24,11 +24,11 @@
2424
import org.eclipse.swt.widgets.Shell;
2525
import org.eclipse.ui.PlatformUI;
2626
import org.eclipse.ui.internal.browser.BrowserViewer;
27-
import org.junit.FixMethodOrder;
28-
import org.junit.Test;
29-
import org.junit.runners.MethodSorters;
27+
import org.junit.jupiter.api.MethodOrderer;
28+
import org.junit.jupiter.api.Test;
29+
import org.junit.jupiter.api.TestMethodOrder;
3030

31-
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
31+
@TestMethodOrder(MethodOrderer.MethodName.class)
3232
public class ToolbarBrowserTestCase {
3333
protected static Dialog dialog;
3434
protected static Shell shell;

tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/UITestHelper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2004, 2023 IBM Corporation and others.
2+
* Copyright (c) 2004, 2026 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -14,7 +14,8 @@
1414
*******************************************************************************/
1515
package org.eclipse.ui.tests.browser.internal;
1616

17-
import static org.junit.Assert.fail;
17+
import static org.junit.jupiter.api.Assertions.assertNotNull;
18+
import static org.junit.jupiter.api.Assertions.fail;
1819

1920
import java.text.MessageFormat;
2021
import java.util.Iterator;
@@ -39,7 +40,6 @@
3940
import org.eclipse.ui.internal.dialogs.PropertyPageContributorManager;
4041
import org.eclipse.ui.internal.dialogs.PropertyPageManager;
4142
import org.eclipse.ui.model.IWorkbenchAdapter;
42-
import org.junit.Assert;
4343

4444
public class UITestHelper {
4545
private static class PreferenceDialogWrapper extends PreferenceDialog {
@@ -126,7 +126,7 @@ public static PropertyDialog getPropertyDialog(String id, IAdaptable element) {
126126
* @param dialog the test dialog to be verified.
127127
*/
128128
public static void assertDialog(Dialog dialog) {
129-
Assert.assertNotNull(dialog);
129+
assertNotNull(dialog);
130130
dialog.setBlockOnOpen(false);
131131
dialog.open();
132132
Shell shell = dialog.getShell();

0 commit comments

Comments
 (0)