diff --git a/ds/org.eclipse.pde.ds.annotations.tests/All DS Annotations Tests.launch b/ds/org.eclipse.pde.ds.annotations.tests/All DS Annotations Tests.launch
deleted file mode 100644
index b150943353c..00000000000
--- a/ds/org.eclipse.pde.ds.annotations.tests/All DS Annotations Tests.launch
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ds/org.eclipse.pde.ds.annotations.tests/META-INF/MANIFEST.MF b/ds/org.eclipse.pde.ds.annotations.tests/META-INF/MANIFEST.MF
index 6241115f75f..4e7f0102f49 100644
--- a/ds/org.eclipse.pde.ds.annotations.tests/META-INF/MANIFEST.MF
+++ b/ds/org.eclipse.pde.ds.annotations.tests/META-INF/MANIFEST.MF
@@ -14,9 +14,8 @@ Require-Bundle: org.eclipse.pde.ds.annotations;bundle-version="[1.1.0,1.5.0)",
org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
org.eclipse.text;bundle-version="[3.6.0,4.0.0)"
Export-Package: org.eclipse.pde.ds.internal.annotations.tests;x-internal:=true
-Import-Package: org.junit,
- org.junit.runner,
- org.junit.runners
+Import-Package: org.junit.jupiter.api;version="[5.14.0,6.0.0)",
+ org.junit.platform.suite.api;version="[1.14.0,2.0.0)"
Eclipse-BundleShape: dir
Bundle-ClassPath: tests.jar
Automatic-Module-Name: org.eclipse.pde.ds.annotations.tests
diff --git a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/AllDSAnnotationsTests.java b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/AllDSAnnotationsTests.java
index a4b5678d8eb..d9d604b01c5 100644
--- a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/AllDSAnnotationsTests.java
+++ b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/AllDSAnnotationsTests.java
@@ -21,15 +21,14 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.platform.suite.api.SelectClasses;
+import org.junit.platform.suite.api.Suite;
import org.osgi.framework.Bundle;
-@RunWith(Suite.class)
-@SuiteClasses({
+@Suite
+@SelectClasses({
ManagedProjectTest.class,
UnmanagedProjectTest.class,
ErrorProjectTest.class,
@@ -48,7 +47,7 @@ public class AllDSAnnotationsTests {
static Job wsJob;
- @BeforeClass
+ @BeforeAll
public static void setUpBeforeClass() throws Exception {
final IWorkspace ws = ResourcesPlugin.getWorkspace();
final Bundle bundle = Activator.getContext().getBundle();
@@ -84,7 +83,7 @@ public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
wsJob.schedule();
}
- @AfterClass
+ @AfterAll
public static void tearDownAfterClass() throws Exception {
wsJob.cancel();
final IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
diff --git a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/AnnotationProcessorTest.java b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/AnnotationProcessorTest.java
index 74e0be3dc69..003e97cb037 100644
--- a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/AnnotationProcessorTest.java
+++ b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/AnnotationProcessorTest.java
@@ -1,8 +1,8 @@
package org.eclipse.pde.ds.internal.annotations.tests;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
@@ -34,7 +34,7 @@ public void setUp() throws Exception {
assumeTrue("Test project does not exist!", testProject.exists());
IFile dsFile = testProject.getFile(IPath.fromOSString(getComponentDescriptorPath()));
- assertTrue("Missing component descriptor!", dsFile.exists());
+ assertTrue(dsFile.exists(),"Missing component descriptor!");
ByteArrayOutputStream buf = new ByteArrayOutputStream();
try (InputStream src = dsFile.getContents()) {
diff --git a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/DefaultComponentTest.java b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/DefaultComponentTest.java
index a5e2aefd9f1..122a50236d7 100644
--- a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/DefaultComponentTest.java
+++ b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/DefaultComponentTest.java
@@ -1,9 +1,9 @@
package org.eclipse.pde.ds.internal.annotations.tests;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import java.util.concurrent.Executor;
@@ -12,7 +12,7 @@
import org.eclipse.pde.internal.ds.core.IDSProvide;
import org.eclipse.pde.internal.ds.core.IDSReference;
import org.eclipse.pde.internal.ds.core.IDSService;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
@SuppressWarnings("restriction")
public class DefaultComponentTest extends AnnotationProcessorTest {
diff --git a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ErrorProjectTest.java b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ErrorProjectTest.java
index 55975a35917..981fa03c76b 100644
--- a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ErrorProjectTest.java
+++ b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ErrorProjectTest.java
@@ -1,13 +1,13 @@
package org.eclipse.pde.ds.internal.annotations.tests;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class ErrorProjectTest extends CompilationParticipantTest {
diff --git a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ExtendedLifeCycleMethodComponentTest.java b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ExtendedLifeCycleMethodComponentTest.java
index 00adcc5cd0b..d600293a85e 100644
--- a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ExtendedLifeCycleMethodComponentTest.java
+++ b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ExtendedLifeCycleMethodComponentTest.java
@@ -1,8 +1,8 @@
package org.eclipse.pde.ds.internal.annotations.tests;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
@SuppressWarnings("restriction")
public class ExtendedLifeCycleMethodComponentTest extends AnnotationProcessorTest {
diff --git a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ExtendedReferenceMethodComponentTest.java b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ExtendedReferenceMethodComponentTest.java
index 9514eb67f48..11a86fc41e0 100644
--- a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ExtendedReferenceMethodComponentTest.java
+++ b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ExtendedReferenceMethodComponentTest.java
@@ -1,12 +1,12 @@
package org.eclipse.pde.ds.internal.annotations.tests;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.util.concurrent.Executor;
import org.eclipse.pde.internal.ds.core.IDSReference;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
@SuppressWarnings("restriction")
public class ExtendedReferenceMethodComponentTest extends AnnotationProcessorTest {
diff --git a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/FullComponentTest.java b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/FullComponentTest.java
index e5b5afd1925..45cd7c49cfd 100644
--- a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/FullComponentTest.java
+++ b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/FullComponentTest.java
@@ -1,9 +1,9 @@
package org.eclipse.pde.ds.internal.annotations.tests;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.Assume.assumeNotNull;
import static org.junit.Assume.assumeTrue;
@@ -17,7 +17,7 @@
import org.eclipse.pde.internal.ds.core.IDSProvide;
import org.eclipse.pde.internal.ds.core.IDSReference;
import org.eclipse.pde.internal.ds.core.IDSService;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
@SuppressWarnings("restriction")
public class FullComponentTest extends AnnotationProcessorTest {
diff --git a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/FullComponentTestV1_2.java b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/FullComponentTestV1_2.java
index caa4130a865..bfb819044bc 100644
--- a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/FullComponentTestV1_2.java
+++ b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/FullComponentTestV1_2.java
@@ -1,9 +1,9 @@
package org.eclipse.pde.ds.internal.annotations.tests;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.Assume.assumeNotNull;
import static org.junit.Assume.assumeTrue;
@@ -17,7 +17,7 @@
import org.eclipse.pde.internal.ds.core.IDSProvide;
import org.eclipse.pde.internal.ds.core.IDSReference;
import org.eclipse.pde.internal.ds.core.IDSService;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
@SuppressWarnings("restriction")
public class FullComponentTestV1_2 extends AnnotationProcessorTest {
diff --git a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ManagedProjectTest.java b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ManagedProjectTest.java
index 92921ec42cb..4b2f44481e0 100644
--- a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ManagedProjectTest.java
+++ b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/ManagedProjectTest.java
@@ -1,10 +1,10 @@
package org.eclipse.pde.ds.internal.annotations.tests;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeNotNull;
import static org.junit.Assume.assumeTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.Arrays;
import java.util.List;
@@ -17,7 +17,7 @@
import org.eclipse.pde.ds.internal.annotations.DSAnnotationCompilationParticipant;
import org.eclipse.pde.internal.core.ibundle.IBundleModel;
import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
@SuppressWarnings("restriction")
public class ManagedProjectTest extends CompilationParticipantTest {
@@ -36,12 +36,12 @@ public void managedProject() throws Exception {
public void dsBuilderConfigured() throws Exception {
ICommand[] commands = testProject.getDescription().getBuildSpec();
boolean hasDSBuilder = Arrays.stream(commands).anyMatch(command -> "org.eclipse.pde.ds.core.builder".equals(command.getBuilderName()));
- assertTrue("DS builder not configured!", hasDSBuilder);
+ assertTrue(hasDSBuilder, "DS builder not configured!");
}
@Test
public void folderOSGIInfCreated() throws Exception {
- assertTrue("Folder OSGI-INF does not exist!", testProject.getFolder("OSGI-INF").exists());
+ assertTrue(testProject.getFolder("OSGI-INF").exists(), "Folder OSGI-INF does not exist!");
}
@Test
@@ -55,9 +55,12 @@ public void manifestHeaderServiceComponentAdded() throws Exception {
String[] entries = serviceComponentHeader.split("\\s*,\\s*");
List entryList = Arrays.asList(entries);
assertEquals(5, entryList.size());
- assertTrue("Missing Service-Component entry for DefaultComponent!", entryList.contains("OSGI-INF/ds.annotations.test1.DefaultComponent.xml"));
- assertTrue("Missing Service-Component entry for FullComponentV1_2!", entryList.contains("OSGI-INF/test.fullComponent-v1_2.xml"));
- assertTrue("Missing Service-Component entry for FullComponent!", entryList.contains("OSGI-INF/test.fullComponent.xml"));
+ assertTrue(entryList.contains("OSGI-INF/ds.annotations.test1.DefaultComponent.xml"),
+ "Missing Service-Component entry for DefaultComponent!");
+ assertTrue(entryList.contains("OSGI-INF/test.fullComponent-v1_2.xml"),
+ "Missing Service-Component entry for FullComponentV1_2!");
+ assertTrue(entryList.contains("OSGI-INF/test.fullComponent.xml"),
+ "Missing Service-Component entry for FullComponent!");
}
@Test
diff --git a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/UnmanagedProjectTest.java b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/UnmanagedProjectTest.java
index 8c7e6a57bf2..c3e03a3cd4d 100644
--- a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/UnmanagedProjectTest.java
+++ b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/UnmanagedProjectTest.java
@@ -1,12 +1,12 @@
package org.eclipse.pde.ds.internal.annotations.tests;
-import static org.junit.Assert.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.Assume.assumeTrue;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.pde.ds.internal.annotations.DSAnnotationCompilationParticipant;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
@SuppressWarnings("restriction")
public class UnmanagedProjectTest extends CompilationParticipantTest {