From 0f444ca1c01621943a7c35b8b122768a06acddde Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Wed, 11 Dec 2024 12:06:26 +0100 Subject: [PATCH] Updating OpenCloseTest to JUnit5 Adding jupiter API to MANIFEST.MF Migrating OpenCloseTest to JUnit5 --- .../org/eclipse/ui/tests/stress/OpenCloseTest.java | 9 +++++---- tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/stress/OpenCloseTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/stress/OpenCloseTest.java index f9c7cd40acb..b553ef4b0aa 100644 --- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/stress/OpenCloseTest.java +++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/stress/OpenCloseTest.java @@ -13,7 +13,8 @@ *******************************************************************************/ package org.eclipse.ui.tests.stress; -import static org.junit.Assert.assertNotNull; + +import static org.junit.jupiter.api.Assertions.assertNotNull; import java.util.HashMap; @@ -41,8 +42,8 @@ import org.eclipse.ui.intro.IIntroPart; import org.eclipse.ui.part.FileEditorInput; import org.eclipse.ui.tests.harness.util.FileUtil; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * Test opening and closing of items. @@ -57,7 +58,7 @@ public class OpenCloseTest { private IWorkbenchPage page; - @Before + @BeforeEach public void setup() { workbench = PlatformUI.getWorkbench(); workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); diff --git a/tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF index ab9288a267d..39f37c97947 100644 --- a/tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF +++ b/tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF @@ -9,7 +9,6 @@ Bundle-Vendor: Eclipse.org Require-Bundle: org.eclipse.core.resources;bundle-version="3.14.0", org.eclipse.core.expressions;bundle-version="3.7.0", org.eclipse.ui, - org.junit, org.eclipse.ui.ide, org.eclipse.ui.editors, org.eclipse.ui.workbench.texteditor, @@ -43,9 +42,11 @@ Require-Bundle: org.eclipse.core.resources;bundle-version="3.14.0", org.eclipse.ui.navigator;bundle-version="3.12.100", org.eclipse.search, org.eclipse.debug.ui, - org.eclipse.emf.ecore + org.eclipse.emf.ecore, + org.junit;bundle-version="4.13.2" Import-Package: jakarta.annotation, jakarta.inject, + org.junit.jupiter.api;version="[5.11.0,6.0.0)", org.osgi.service.event Eclipse-AutoStart: true Export-Package: org.eclipse.ui.tests.api,