Skip to content

Commit

Permalink
See #23743: MinimapDialogTest was failing
Browse files Browse the repository at this point in the history
This re-adds parameter resolution for DownloadWmsAlongTrackActionTest

git-svn-id: https://josm.openstreetmap.de/svn/trunk@19118 0c6e7542-c601-0410-84e7-c038aed88b3b
  • Loading branch information
taylor.smock committed Jun 19, 2024
1 parent 5db9c49 commit a3c38ac
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.api.extension.ParameterContext;
import org.junit.jupiter.api.extension.ParameterResolutionException;
import org.openstreetmap.josm.data.imagery.ImageryInfo;
import org.openstreetmap.josm.data.imagery.ImageryLayerInfo;
import org.openstreetmap.josm.gui.bbox.JosmMapViewer;
Expand Down Expand Up @@ -125,6 +127,24 @@ protected void onAfterEach(ExtensionContext extensionContext, WireMockRuntimeInf
}
}

@Override
public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
throws ParameterResolutionException {
if (parameterContext.getParameter().getType().equals(FakeImageryWireMockExtension.class)) {
return true;
}
return super.supportsParameter(parameterContext, extensionContext);
}

@Override
public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
throws ParameterResolutionException {
if (parameterContext.getParameter().getType().equals(FakeImageryWireMockExtension.class)) {
return this;
}
return super.resolveParameter(parameterContext, extensionContext);
}

private void registerLayers(ExtensionContext.Store store, WireMockRuntimeInfo wireMockRuntimeInfo) {
if (this.clearSlippyMapSources) {
try {
Expand Down

0 comments on commit a3c38ac

Please sign in to comment.