|
14 | 14 |
|
15 | 15 | package org.eclipse.ui.tests.pluginchecks; |
16 | 16 |
|
17 | | -import static org.junit.Assert.assertNotNull; |
18 | | -import static org.junit.Assert.assertTrue; |
19 | | -import static org.junit.Assert.fail; |
| 17 | +import static org.junit.jupiter.api.Assertions.assertNotNull; |
| 18 | +import static org.junit.jupiter.api.Assertions.assertTrue; |
| 19 | +import static org.junit.jupiter.api.Assertions.fail; |
20 | 20 |
|
21 | 21 | import java.io.IOException; |
22 | 22 | import java.io.InputStream; |
|
37 | 37 | import org.eclipse.core.runtime.IExtensionPoint; |
38 | 38 | import org.eclipse.core.runtime.IExtensionRegistry; |
39 | 39 | import org.eclipse.core.runtime.RegistryFactory; |
40 | | -import org.junit.Before; |
41 | | -import org.junit.Test; |
| 40 | +import org.junit.jupiter.api.BeforeEach; |
| 41 | +import org.junit.jupiter.api.Test; |
42 | 42 | import org.osgi.framework.Bundle; |
43 | 43 | import org.osgi.framework.BundleContext; |
44 | 44 | import org.osgi.framework.Constants; |
@@ -66,10 +66,10 @@ public class PluginWalkerTest { |
66 | 66 | private BundleContext bundleContext; |
67 | 67 | private List<String> bundlesWithPluginXml; |
68 | 68 |
|
69 | | - @Before |
| 69 | + @BeforeEach |
70 | 70 | public void setup() throws Exception { |
71 | 71 | Bundle bundle = FrameworkUtil.getBundle(PluginWalkerTest.class); |
72 | | - assertNotNull("Make sure you're running this as a plugin test", bundle); |
| 72 | + assertNotNull(bundle, "Make sure you're running this as a plugin test"); |
73 | 73 | assertNotNull(bundle); |
74 | 74 | bundleContext = bundle.getBundleContext(); |
75 | 75 | bundlesWithPluginXml = List.of("org.eclipse.e4.ui.css.swt", "org.eclipse.e4.ui.model.workbench", |
@@ -101,10 +101,8 @@ public void ensurePluginxmlContainsAtLeastOneEntry() throws Exception { |
101 | 101 | boolean hasExtension = extensions.getLength() > 0; |
102 | 102 | boolean hasExtensionPoint = extensionpoint.getLength() > 0; |
103 | 103 |
|
104 | | - assertTrue( |
105 | | - "plugin.xml from " + bundleSymbolicName |
106 | | - + " must contain at least one extension point or extension", |
107 | | - hasExtension || hasExtensionPoint); |
| 104 | + assertTrue(hasExtension || hasExtensionPoint, "plugin.xml from " + bundleSymbolicName |
| 105 | + + " must contain at least one extension point or extension"); |
108 | 106 | } |
109 | 107 |
|
110 | 108 | } |
|
0 commit comments