Changeset 16160 in josm for trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerMultiVersionTest.java
- Timestamp:
- 2020-03-17T20:09:41+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerMultiVersionTest.java
r14213 r16160 9 9 import java.io.File; 10 10 import java.nio.file.Files; 11 import java.util.HashMap; 11 12 import java.util.List; 13 import java.util.Map; 12 14 13 15 import org.junit.Before; … … 25 27 import com.github.tomakehurst.wiremock.junit.WireMockRule; 26 28 import com.google.common.collect.ImmutableList; 27 import com.google.common.collect.ImmutableMap;28 29 29 30 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 96 97 97 98 final String quxNewerServePath = "/qux/newer.jar"; 99 final Map<String, String> attrOverrides = new HashMap<String, String>() {{ 100 put("7500_Plugin-Url", "432;http://localhost:" + pluginServerRule.port() + quxNewerServePath); 101 put("7499_Plugin-Url", "346;http://localhost:" + pluginServerRule.port() + "/not/served.jar"); 102 put("6999_Plugin-Url", "345;http://localhost:" + pluginServerRule.port() + "/not/served/eithejar"); 103 }}; 98 104 final PluginServer pluginServer = new PluginServer( 99 105 new PluginServer.RemotePlugin(this.referenceBazJarOld), 100 new PluginServer.RemotePlugin(this.referenceQuxJarNewest, ImmutableMap.of( 101 "7500_Plugin-Url", "432;http://localhost:" + this.pluginServerRule.port() + quxNewerServePath, 102 "7499_Plugin-Url", "346;http://localhost:" + this.pluginServerRule.port() + "/not/served.jar", 103 "6999_Plugin-Url", "345;http://localhost:" + this.pluginServerRule.port() + "/not/served/either.jar" 104 )) 106 new PluginServer.RemotePlugin(this.referenceQuxJarNewest, attrOverrides) 105 107 ); 106 108 pluginServer.applyToWireMockServer(this.pluginServerRule); … … 161 163 TestUtils.assumeWorkingJMockit(); 162 164 165 final Map<String, String> attrOverrides = new HashMap<String, String>() {{ 166 put("7500_Plugin-Url", "432;http://localhost:" + pluginServerRule.port() + "/dont.jar"); 167 put("7499_Plugin-Url", "346;http://localhost:" + pluginServerRule.port() + "/even.jar"); 168 put("6999_Plugin-Url", "345;http://localhost:" + pluginServerRule.port() + "/bother.jar"); 169 }}; 163 170 final PluginServer pluginServer = new PluginServer( 164 171 new PluginServer.RemotePlugin(this.referenceBazJarOld), 165 new PluginServer.RemotePlugin(this.referenceQuxJarNewest, ImmutableMap.of( 166 "7500_Plugin-Url", "432;http://localhost:" + this.pluginServerRule.port() + "/dont.jar", 167 "7499_Plugin-Url", "346;http://localhost:" + this.pluginServerRule.port() + "/even.jar", 168 "6999_Plugin-Url", "345;http://localhost:" + this.pluginServerRule.port() + "/bother.jar" 169 )) 172 new PluginServer.RemotePlugin(this.referenceQuxJarNewest, attrOverrides) 170 173 ); 171 174 pluginServer.applyToWireMockServer(this.pluginServerRule);
Note:
See TracChangeset
for help on using the changeset viewer.
