Changeset 19118 in josm for trunk/test


Ignore:
Timestamp:
2024-06-19T20:17:08+02:00 (5 months ago)
Author:
taylor.smock
Message:

See #23743: MinimapDialogTest was failing

This re-adds parameter resolution for DownloadWmsAlongTrackActionTest

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/FakeImagery.java

    r19117 r19118  
    1717import org.junit.jupiter.api.extension.ExtendWith;
    1818import org.junit.jupiter.api.extension.ExtensionContext;
     19import org.junit.jupiter.api.extension.ParameterContext;
     20import org.junit.jupiter.api.extension.ParameterResolutionException;
    1921import org.openstreetmap.josm.data.imagery.ImageryInfo;
    2022import org.openstreetmap.josm.data.imagery.ImageryLayerInfo;
     
    126128        }
    127129
     130        @Override
     131        public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
     132                throws ParameterResolutionException {
     133            if (parameterContext.getParameter().getType().equals(FakeImageryWireMockExtension.class)) {
     134                return true;
     135            }
     136            return super.supportsParameter(parameterContext, extensionContext);
     137        }
     138
     139        @Override
     140        public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
     141                throws ParameterResolutionException {
     142            if (parameterContext.getParameter().getType().equals(FakeImageryWireMockExtension.class)) {
     143                return this;
     144            }
     145            return super.resolveParameter(parameterContext, extensionContext);
     146        }
     147
    128148        private void registerLayers(ExtensionContext.Store store, WireMockRuntimeInfo wireMockRuntimeInfo) {
    129149            if (this.clearSlippyMapSources) {
Note: See TracChangeset for help on using the changeset viewer.