Changeset 17383 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2020-12-01T20:59:49+01:00 (4 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreferenceTestIT.java
r17275 r17383 9 9 import java.util.Collection; 10 10 11 import org.junit.jupiter.api.Test; 11 12 import org.junit.jupiter.api.extension.RegisterExtension; 12 import org.junit.jupiter.api.Test;13 13 import org.openstreetmap.josm.data.preferences.sources.ExtendedSourceEntry; 14 14 import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker; … … 38 38 Collection<ExtendedSourceEntry> sources = new ValidatorTagCheckerRulesPreference.TagCheckerRulesSourceEditor() 39 39 .loadAndGetAvailableSources(); 40 assertFalse(sources.isEmpty() );40 assertFalse(sources.isEmpty(), sources::toString); 41 41 Collection<Throwable> allErrors = new ArrayList<>(); 42 42 MapCSSTagChecker tagChecker = new MapCSSTagChecker(); … … 45 45 try { 46 46 ParseResult result = tagChecker.addMapCSS(source.url); 47 assertFalse(result.parseChecks.isEmpty() );47 assertFalse(result.parseChecks.isEmpty(), result::toString); 48 48 System.out.println(result.parseErrors.isEmpty() ? " => OK" : " => KO"); 49 49 allErrors.addAll(result.parseErrors); … … 54 54 } 55 55 } 56 assertTrue(allErrors.isEmpty() );56 assertTrue(allErrors.isEmpty(), allErrors::toString); 57 57 } 58 58 } -
trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java
r17288 r17383 36 36 import org.openstreetmap.josm.testutils.JOSMTestRules; 37 37 import org.openstreetmap.josm.tools.Destroyable; 38 import org.openstreetmap.josm.tools.Logging; 38 39 import org.openstreetmap.josm.tools.Utils; 39 40 … … 121 122 // removed and readded) 122 123 for (int i = 0; i < 2; i++) { 123 assertFalse(PluginHandler.removePlugins(restartable)); 124 assertTrue(restartable.stream().noneMatch(info -> PluginHandler.getPlugins().contains(info))); 124 assertFalse(PluginHandler.removePlugins(restartable), () -> Logging.getLastErrorAndWarnings().toString()); 125 List<PluginInformation> notRemovedPlugins = restartable.stream() 126 .filter(info -> PluginHandler.getPlugins().contains(info)).collect(Collectors.toList()); 127 assertTrue(notRemovedPlugins.isEmpty(), notRemovedPlugins::toString); 125 128 loadPlugins(restartable); 126 129 } 127 130 128 assertTrue(PluginHandler.removePlugins(loadedPlugins) );131 assertTrue(PluginHandler.removePlugins(loadedPlugins), () -> Logging.getLastErrorAndWarnings().toString()); 129 132 assertTrue(restartable.parallelStream().noneMatch(info -> PluginHandler.getPlugins().contains(info))); 130 133 } catch (Exception | LinkageError t) { … … 162 165 List<PluginInformation> plugins = pluginInfoDownloadTask.getAvailablePlugins(); 163 166 System.out.println("Original plugin list contains " + plugins.size() + " plugins"); 164 assertFalse(plugins.isEmpty() );167 assertFalse(plugins.isEmpty(), plugins::toString); 165 168 PluginInformation info = plugins.get(0); 166 assertFalse(info.getName().isEmpty() );167 assertFalse(info.getClass().getName().isEmpty() );169 assertFalse(info.getName().isEmpty(), info::toString); 170 assertFalse(info.getClass().getName().isEmpty(), info::toString); 168 171 169 172 // Filter deprecated and unmaintained ones, or those not responsive enough to match our continuous integration needs
Note:
See TracChangeset
for help on using the changeset viewer.