Changeset 15717 in josm for trunk/test
- Timestamp:
- 2020-01-18T14:14:01+01:00 (5 years ago)
- Location:
- trunk/test
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java
r14190 r15717 18 18 import java.text.MessageFormat; 19 19 import java.util.ArrayList; 20 import java.util.Arrays; 20 21 import java.util.Locale; 21 22 import java.util.Random; 23 import java.util.TreeSet; 22 24 import java.util.logging.Logger; 23 25 … … 35 37 import org.openstreetmap.josm.data.osm.Node; 36 38 import org.openstreetmap.josm.data.osm.OsmPrimitive; 39 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 37 40 import org.openstreetmap.josm.data.osm.Relation; 38 41 import org.openstreetmap.josm.data.osm.RelationMember; … … 42 45 43 46 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 47 import org.openstreetmap.josm.testutils.JOSMTestRules; 44 48 45 49 /** … … 49 53 public class MultiFetchServerObjectReaderTest { 50 54 private static Logger logger = Logger.getLogger(MultiFetchServerObjectReader.class.getName()); 55 56 /** 57 * Setup test. 58 */ 59 @Rule 60 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 61 public JOSMTestRules test = new JOSMTestRules().preferences(); 51 62 52 63 /** … … 332 343 assertEquals(9999999, reader.getMissingPrimitives().iterator().next().getUniqueId()); 333 344 } 345 346 /** 347 * Test {@link MultiFetchServerObjectReader#buildRequestString} 348 */ 349 @Test 350 public void testBuildRequestString() { 351 String requestString = new MultiFetchServerObjectReader() 352 .buildRequestString(OsmPrimitiveType.WAY, new TreeSet<>(Arrays.asList(130L, 123L, 126L))); 353 assertEquals("ways?ways=123,126,130", requestString); 354 } 334 355 } -
trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java
r14317 r15717 10 10 import java.util.Arrays; 11 11 import java.util.List; 12 import java.util.stream.Collectors; 13 import java.util.stream.Stream; 12 14 13 15 import javax.swing.JScrollPane; … … 24 26 import org.openstreetmap.josm.testutils.mockers.HelpAwareOptionPaneMocker; 25 27 import org.openstreetmap.josm.testutils.mockers.JOptionPaneSimpleMocker; 26 import org.openstreetmap.josm.tools.Utils;27 28 28 import com.google.common.collect.ImmutableMap; 29 29 … … 70 70 final String old = System.getProperty("josm.plugins"); 71 71 try { 72 System.setProperty("josm.plugins", 73 Utils.join(",", PluginHandler.DEPRECATED_PLUGINS) + "," + 74 Utils.join(",", Arrays.asList(PluginHandler.UNMAINTAINED_PLUGINS))); 72 final String plugins = Stream.concat( 73 PluginHandler.DEPRECATED_PLUGINS.stream(), 74 PluginHandler.UNMAINTAINED_PLUGINS.stream() 75 ).map(String::valueOf).collect(Collectors.joining(",")); 76 System.setProperty("josm.plugins", plugins); 75 77 List<PluginInformation> list = PluginHandler.buildListOfPluginsToLoad(null, null); 76 78 assertNotNull(list);
Note:
See TracChangeset
for help on using the changeset viewer.