Ignore:
Timestamp:
2020-03-17T20:09:38+01:00 (4 years ago)
Author:
simon04
Message:

see #18948 - Use Collections.singletonMap instead of ImmutableMap.of

Location:
trunk/test/unit/org/openstreetmap/josm/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerJOSMTooOldTest.java

    r14213 r16159  
    1010import java.io.IOException;
    1111import java.nio.file.Files;
     12import java.util.Collections;
    1213import java.util.List;
    1314
     
    254255        final PluginServer pluginServer = new PluginServer(
    255256            new PluginServer.RemotePlugin(this.referenceDummyJarNew),
    256             new PluginServer.RemotePlugin(this.referenceBazJarNew, ImmutableMap.of(
    257                 "Plugin-Mainversion", "5500"
    258             ))
     257            new PluginServer.RemotePlugin(this.referenceBazJarNew, Collections.singletonMap("Plugin-Mainversion", "5500"))
    259258        );
    260259        pluginServer.applyToWireMockServer(this.pluginServerRule);
     
    312311        final PluginServer pluginServer = new PluginServer(
    313312            new PluginServer.RemotePlugin(this.referenceBazJarOld),
    314             new PluginServer.RemotePlugin(this.referenceQuxJarNewer, ImmutableMap.of(
     313            new PluginServer.RemotePlugin(this.referenceQuxJarNewer, Collections.singletonMap(
    315314                "7499_Plugin-Url", "346;http://localhost:" + this.pluginServerRule.port() + "/dont/bother.jar"
    316315            ))
     
    319318        Config.getPref().putList("plugins", ImmutableList.of("qux_plugin", "baz_plugin"));
    320319
    321         new ExtendedDialogMocker(ImmutableMap.of("JOSM version 7,500 required for plugin qux_plugin.", "Download Plugin"));
     320        new ExtendedDialogMocker(Collections.singletonMap("JOSM version 7,500 required for plugin qux_plugin.", "Download Plugin"));
    322321
    323322        Files.copy(this.referenceQuxJarOld.toPath(), this.targetQuxJar.toPath());
  • trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java

    r15737 r16159  
    99import java.util.ArrayList;
    1010import java.util.Arrays;
     11import java.util.Collections;
    1112import java.util.List;
    1213import java.util.stream.Collectors;
     
    2728import org.openstreetmap.josm.testutils.mockers.HelpAwareOptionPaneMocker;
    2829import org.openstreetmap.josm.testutils.mockers.JOptionPaneSimpleMocker;
    29 
    30 import com.google.common.collect.ImmutableMap;
    3130
    3231import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     
    104103        TestUtils.assumeWorkingJMockit();
    105104        final JOptionPaneSimpleMocker jopsMocker = new JOptionPaneSimpleMocker(
    106             ImmutableMap.<String, Object>of(
     105            Collections.singletonMap(
    107106                "<html>The following plugin is no longer necessary and has been deactivated:" +
    108107                    "<ul><li>imagery (integrated into main program)</li></ul></html>",
     
    129128        TestUtils.assumeWorkingJMockit();
    130129        final HelpAwareOptionPaneMocker haMocker = new HelpAwareOptionPaneMocker(
    131             ImmutableMap.<String, Object>of(
     130            Collections.singletonMap(
    132131                "<html>Loading of the plugin \"gpsbabelgui\" was requested.<br>" +
    133132                    "This plugin is no longer developed and very likely will produce errors.<br>" +
Note: See TracChangeset for help on using the changeset viewer.