Skip to content

Commit

Permalink
cleanup and test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
turingtestfail committed Jan 31, 2025
1 parent 64e9496 commit d13fd9b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
import static org.geoserver.mapml.MapMLConstants.MAPML_MIME_TYPE;
import static org.geoserver.mapml.MapMLConstants.MAPML_SKIP_ATTRIBUTES_FO;
import static org.geoserver.mapml.MapMLConstants.MAPML_SKIP_STYLES_FO;
import static org.geoserver.mapml.MapMLConstants.MAPML_USE_FEATURES;
import static org.geoserver.mapml.MapMLConstants.MAPML_USE_FEATURES_REP;
import static org.geoserver.mapml.MapMLConstants.MAPML_USE_FEATURES_REP_DEFAULT;
import static org.geoserver.mapml.MapMLConstants.MAPML_USE_REMOTE;
import static org.geoserver.mapml.MapMLConstants.MAPML_USE_TILES;
import static org.geoserver.mapml.MapMLConstants.MAPML_USE_TILES_REP;
import static org.geoserver.mapml.MapMLConstants.MAPML_USE_TILES_REP_DEFAULT;
import static org.geoserver.mapml.template.MapMLMapTemplate.MAPML_PREVIEW_HEAD_FTL;
Expand Down Expand Up @@ -45,7 +43,6 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.geoserver.catalog.Catalog;
Expand Down Expand Up @@ -98,7 +95,6 @@
import org.geoserver.wms.GetMapRequest;
import org.geoserver.wms.MapLayerInfo;
import org.geoserver.wms.WMS;
import org.geoserver.wms.WMSInfo;
import org.geoserver.wms.WMSMapContent;
import org.geoserver.wms.capabilities.CapabilityUtil;
import org.geoserver.wms.capabilities.DimensionHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import org.apache.wicket.markup.html.form.CheckBox;
import org.apache.wicket.model.IModel;
import org.geoserver.mapml.MapMLConstants;
import org.geoserver.mapml.MapMLDocumentBuilder;
import org.geoserver.web.services.AdminPagePanel;
import org.geoserver.web.util.MapModel;
import org.geoserver.wms.WMSInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.apache.wicket.model.Model;
import org.apache.wicket.util.tester.FormTester;
import org.geoserver.mapml.MapMLConstants;
import org.geoserver.mapml.MapMLDocumentBuilder;
import org.geoserver.web.ComponentBuilder;
import org.geoserver.web.FormTestPage;
import org.geoserver.web.GeoServerWicketTestSupport;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
*/
package org.geoserver.mapml.web.demo;

import static org.geoserver.mapml.MapMLConstants.MAPML_MULTILAYER_AS_MULTIEXTENT;
import static org.geoserver.mapml.MapMLConstants.MAPML_USE_FEATURES;
import static org.junit.Assert.assertEquals;

import java.io.IOException;
import org.apache.wicket.Component;
import org.apache.wicket.MarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
Expand All @@ -20,12 +25,6 @@
import org.junit.After;
import org.junit.Test;

import java.io.IOException;

import static org.geoserver.mapml.MapMLConstants.MAPML_MULTILAYER_AS_MULTIEXTENT;
import static org.geoserver.mapml.MapMLConstants.MAPML_USE_FEATURES;
import static org.junit.Assert.assertEquals;

public class MapMLMapPreviewTest extends GeoServerWicketTestSupport {

@Override
Expand All @@ -51,7 +50,7 @@ public void testUrlFormatDefault() throws Exception {
"http://localhost/context/cgf/wms?service=WMS&version=1.1.0&request=GetMap&layers=cgf%3ALines&"
+ "bbox=-97.4903565027649%2C-8.117456282619509E-4%2C-97.4871312635105%2C8.117456282619509E-4&"
+ "width=768&height=384&srs=MapML%3AWGS84&styles=&format=text%2Fhtml%3B%20subtype%3Dmapml&"
+ "format_options=mapmlMultiLayerAsMultiExtent%3Dfalse%3Bmapmlfeatures%3Dfalse");
+ "format_options=mapmlmultiextent%3Dfalse%3Bmapmlfeatures%3Dfalse");
}

@Test
Expand All @@ -64,7 +63,7 @@ public void testUrlFormatFeature() throws Exception {
"http://localhost/context/cgf/wms?service=WMS&version=1.1.0&request=GetMap&layers=cgf%3ALines&"
+ "bbox=-97.4903565027649%2C-8.117456282619509E-4%2C-97.4871312635105%2C8.117456282619509E-4&"
+ "width=768&height=384&srs=MapML%3AWGS84&styles=&format=text%2Fhtml%3B%20subtype%3Dmapml&"
+ "format_options=mapmlMultiLayerAsMultiExtent%3Dfalse%3Bmapmlfeatures%3Dtrue");
+ "format_options=mapmlmultiextent%3Dfalse%3Bmapmlfeatures%3Dtrue");
}

@Test
Expand All @@ -76,7 +75,7 @@ public void testURLFormatMulti() throws Exception {
"http://localhost/context/cgf/wms?service=WMS&version=1.1.0&request=GetMap&layers=cgf%3ALines&"
+ "bbox=-97.4903565027649%2C-8.117456282619509E-4%2C-97.4871312635105%2C8.117456282619509E-4&"
+ "width=768&height=384&srs=MapML%3AWGS84&styles=&format=text%2Fhtml%3B%20subtype%3Dmapml&"
+ "format_options=mapmlMultiLayerAsMultiExtent%3Dtrue%3Bmapmlfeatures%3Dfalse");
+ "format_options=mapmlmultiextent%3Dtrue%3Bmapmlfeatures%3Dfalse");
}

private static void assertLink(String link) {
Expand Down

0 comments on commit d13fd9b

Please sign in to comment.