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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceHighLevelTest.java

    r14213 r16159  
    1212import java.nio.file.Files;
    1313import java.util.Collection;
     14import java.util.Collections;
    1415
    1516import javax.swing.JOptionPane;
     
    3536import com.github.tomakehurst.wiremock.junit.WireMockRule;
    3637import com.google.common.collect.ImmutableList;
    37 import com.google.common.collect.ImmutableMap;
    3838
    3939import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     
    137137            new PluginServer.RemotePlugin(this.referenceDummyJarNew),
    138138            new PluginServer.RemotePlugin(this.referenceBazJarOld),
    139             new PluginServer.RemotePlugin(null, ImmutableMap.of("Plugin-Version", "2"), "irrelevant_plugin")
     139            new PluginServer.RemotePlugin(null, Collections.singletonMap("Plugin-Version", "2"), "irrelevant_plugin")
    140140        );
    141141        pluginServer.applyToWireMockServer(this.pluginServerRule);
     
    143143
    144144        final HelpAwareOptionPaneMocker haMocker = new HelpAwareOptionPaneMocker(
    145             ImmutableMap.<String, Object>of(
     145            Collections.singletonMap(
    146146                "<html>The following plugin has been downloaded <strong>successfully</strong>:"
    147147                + "<ul><li>baz_plugin (6)</li></ul>"
     
    268268
    269269        final HelpAwareOptionPaneMocker haMocker = new HelpAwareOptionPaneMocker(
    270             ImmutableMap.<String, Object>of(
     270            Collections.singletonMap(
    271271                "<html>You have to restart JOSM for some settings to take effect."
    272272                + "<br/><br/>Would you like to restart now?</html>",
     
    581581            new PluginServer.RemotePlugin(this.referenceDummyJarOld),
    582582            new PluginServer.RemotePlugin(this.referenceBazJarOld),
    583             new PluginServer.RemotePlugin(null, ImmutableMap.of("Plugin-Version", "123"), "irrelevant_plugin")
     583            new PluginServer.RemotePlugin(null, Collections.singletonMap("Plugin-Version", "123"), "irrelevant_plugin")
    584584        );
    585585        pluginServer.applyToWireMockServer(this.pluginServerRule);
     
    587587
    588588        final HelpAwareOptionPaneMocker haMocker = new HelpAwareOptionPaneMocker(
    589             ImmutableMap.<String, Object>of(
     589            Collections.singletonMap(
    590590                "All installed plugins are up to date. JOSM does not have to download newer versions.",
    591591                "OK"
     
    740740
    741741        final HelpAwareOptionPaneMocker haMocker = new HelpAwareOptionPaneMocker();
    742         final JOptionPaneSimpleMocker jopsMocker = new JOptionPaneSimpleMocker(ImmutableMap.<String, Object>of(
     742        final JOptionPaneSimpleMocker jopsMocker = new JOptionPaneSimpleMocker(Collections.singletonMap(
    743743            "<html>The following plugin has been downloaded <strong>successfully</strong>:"
    744744            + "<ul><li>dummy_plugin (31772)</li></ul></html>",
     
    845845        final PluginServer pluginServer = new PluginServer(
    846846            new PluginServer.RemotePlugin(this.referenceDummyJarNew),
    847             new PluginServer.RemotePlugin(this.referenceBazJarNew, ImmutableMap.of(
     847            new PluginServer.RemotePlugin(this.referenceBazJarNew, Collections.singletonMap(
    848848                "6800_Plugin-Url", "6;http://localhost:" + this.pluginServerRule.port() + bazOldServePath
    849849            ))
     
    860860        Config.getPref().putList("plugins", ImmutableList.of());
    861861
    862         final HelpAwareOptionPaneMocker haMocker = new HelpAwareOptionPaneMocker(ImmutableMap.of(
     862        final HelpAwareOptionPaneMocker haMocker = new HelpAwareOptionPaneMocker(Collections.singletonMap(
    863863            "<html>The following plugin has been downloaded <strong>successfully</strong>:"
    864864            + "<ul><li>baz_plugin (6)</li></ul>"
Note: See TracChangeset for help on using the changeset viewer.