Changeset 17275 in josm for trunk/test/unit/org/openstreetmap/josm/plugins
- Timestamp:
- 2020-10-28T20:41:00+01:00 (3 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/plugins
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/plugins/PluginDownloadExceptionTest.java
r12754 r17275 2 2 package org.openstreetmap.josm.plugins; 3 3 4 import static org.junit. Assert.assertEquals;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 5 6 import org.junit. Rule;7 import org.junit. Test;6 import org.junit.jupiter.api.extension.RegisterExtension; 7 import org.junit.jupiter.api.Test; 8 8 import org.openstreetmap.josm.testutils.JOSMTestRules; 9 9 … … 13 13 * Unit tests of {@link PluginDownloadException} class. 14 14 */ 15 publicclass PluginDownloadExceptionTest {15 class PluginDownloadExceptionTest { 16 16 17 17 /** 18 18 * Setup test. 19 19 */ 20 @R ule20 @RegisterExtension 21 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 22 public JOSMTestRules test = new JOSMTestRules(); … … 26 26 */ 27 27 @Test 28 publicvoid testPluginDownloadException() {28 void testPluginDownloadException() { 29 29 PluginDownloadException ex = new PluginDownloadException("foo"); 30 30 assertEquals("foo", ex.getMessage()); -
trunk/test/unit/org/openstreetmap/josm/plugins/PluginExceptionTest.java
r12754 r17275 2 2 package org.openstreetmap.josm.plugins; 3 3 4 import static org.junit. Assert.assertEquals;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 5 6 import org.junit. Rule;7 import org.junit. Test;6 import org.junit.jupiter.api.extension.RegisterExtension; 7 import org.junit.jupiter.api.Test; 8 8 import org.openstreetmap.josm.testutils.JOSMTestRules; 9 9 … … 13 13 * Unit tests of {@link PluginException} class. 14 14 */ 15 publicclass PluginExceptionTest {15 class PluginExceptionTest { 16 16 17 17 /** 18 18 * Setup test. 19 19 */ 20 @R ule20 @RegisterExtension 21 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 22 public JOSMTestRules test = new JOSMTestRules(); … … 26 26 */ 27 27 @Test 28 publicvoid testPluginDownloadException() {28 void testPluginDownloadException() { 29 29 PluginException ex = new PluginException("foo"); 30 30 assertEquals("foo", ex.getMessage()); -
trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java
r16159 r17275 2 2 package org.openstreetmap.josm.plugins; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertFalse;6 import static org.junit. Assert.assertNotNull;7 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertFalse; 6 import static org.junit.jupiter.api.Assertions.assertNotNull; 7 import static org.junit.jupiter.api.Assertions.assertTrue; 8 8 9 9 import java.util.ArrayList; … … 17 17 import javax.swing.JScrollPane; 18 18 19 import org.junit. Rule;20 import org.junit. Test;19 import org.junit.jupiter.api.extension.RegisterExtension; 20 import org.junit.jupiter.api.Test; 21 21 import org.openstreetmap.josm.TestUtils; 22 22 import org.openstreetmap.josm.gui.MainApplication; … … 35 35 * Unit tests of {@link PluginHandler} class. 36 36 */ 37 publicclass PluginHandlerTest {37 class PluginHandlerTest { 38 38 39 39 /** 40 40 * Setup test. 41 41 */ 42 @R ule42 @RegisterExtension 43 43 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 44 44 public JOSMTestRules test = new JOSMTestRules(); … … 48 48 */ 49 49 @Test 50 publicvoid testEqualsContract() {50 void testEqualsContract() { 51 51 TestUtils.assumeWorkingEqualsVerifier(); 52 52 EqualsVerifier.forClass(DeprecatedPlugin.class).usingGetClass().verify(); … … 57 57 */ 58 58 @Test 59 publicvoid testBuildListOfPluginsToLoad() {59 void testBuildListOfPluginsToLoad() { 60 60 TestUtils.assumeWorkingJMockit(); 61 61 final HelpAwareOptionPaneMocker haMocker = new HelpAwareOptionPaneMocker( … … 100 100 */ 101 101 @Test 102 publicvoid testFilterDeprecatedPlugins() {102 void testFilterDeprecatedPlugins() { 103 103 TestUtils.assumeWorkingJMockit(); 104 104 final JOptionPaneSimpleMocker jopsMocker = new JOptionPaneSimpleMocker( … … 125 125 */ 126 126 @Test 127 publicvoid testFilterUnmaintainedPlugins() {127 void testFilterUnmaintainedPlugins() { 128 128 TestUtils.assumeWorkingJMockit(); 129 129 final HelpAwareOptionPaneMocker haMocker = new HelpAwareOptionPaneMocker( … … 152 152 */ 153 153 @Test 154 publicvoid testPluginInformationAction() throws PluginException {154 void testPluginInformationAction() throws PluginException { 155 155 TestUtils.assumeWorkingJMockit(); 156 156 final String expectedText = "Ant-Version: Apache Ant 1.9.6\n" + -
trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java
r17129 r17275 2 2 package org.openstreetmap.josm.plugins; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertFalse;6 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertFalse; 6 import static org.junit.jupiter.api.Assertions.assertTrue; 7 7 8 8 import java.awt.GraphicsEnvironment; … … 21 21 import java.util.stream.Collectors; 22 22 23 import org.junit.BeforeClass;24 23 import org.junit.ClassRule; 25 import org.junit.Test; 24 import org.junit.jupiter.api.BeforeAll; 25 import org.junit.jupiter.api.Test; 26 26 import org.openstreetmap.josm.TestUtils; 27 27 import org.openstreetmap.josm.data.Preferences; … … 59 59 * @throws IOException in case of I/O error 60 60 */ 61 @Before Class61 @BeforeAll 62 62 public static void beforeClass() throws IOException { 63 63 errorsToIgnore.addAll(TestUtils.getIgnoredErrorMessages(PluginHandlerTestIT.class)); … … 68 68 */ 69 69 @Test 70 publicvoid testValidityOfAvailablePlugins() {70 void testValidityOfAvailablePlugins() { 71 71 loadAllPlugins(); 72 72 … … 109 109 Arrays.toString(layerExceptions.entrySet().toArray()) + '\n' 110 110 + Arrays.toString(noRestartExceptions.entrySet().toArray()); 111 assertTrue( msg, invalidManifestEntries.isEmpty() && loadingExceptions.isEmpty() && layerExceptions.isEmpty());111 assertTrue(invalidManifestEntries.isEmpty() && loadingExceptions.isEmpty() && layerExceptions.isEmpty(), msg); 112 112 } 113 113 … … 254 254 // Restore default timeout 255 255 Config.getPref().putInt("socket.timeout.read", defTimeout); 256 assertTrue(pluginDownloadTask.getFailedPlugins(). toString(), pluginDownloadTask.getFailedPlugins().isEmpty());256 assertTrue(pluginDownloadTask.getFailedPlugins().isEmpty(), pluginDownloadTask.getFailedPlugins()::toString); 257 257 assertEquals(plugins.size(), pluginDownloadTask.getDownloadedPlugins().size()); 258 258 -
trunk/test/unit/org/openstreetmap/josm/plugins/PluginListParseExceptionTest.java
r12754 r17275 2 2 package org.openstreetmap.josm.plugins; 3 3 4 import static org.junit. Assert.assertEquals;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 5 6 import org.junit. Rule;7 import org.junit. Test;6 import org.junit.jupiter.api.extension.RegisterExtension; 7 import org.junit.jupiter.api.Test; 8 8 import org.openstreetmap.josm.testutils.JOSMTestRules; 9 9 … … 13 13 * Unit tests of {@link PluginListParseException} class. 14 14 */ 15 publicclass PluginListParseExceptionTest {15 class PluginListParseExceptionTest { 16 16 17 17 /** 18 18 * Setup test. 19 19 */ 20 @R ule20 @RegisterExtension 21 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 22 public JOSMTestRules test = new JOSMTestRules(); … … 26 26 */ 27 27 @Test 28 publicvoid testPluginListParseException() {28 void testPluginListParseException() { 29 29 NullPointerException npe = new NullPointerException(); 30 30 PluginListParseException ex = new PluginListParseException(npe);
Note:
See TracChangeset
for help on using the changeset viewer.