Ignore:
Timestamp:
2018-01-03T23:17:07+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #15730 - support WMS capabilities with embedded HTML in layer Abstract tag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/imagery/WMSImageryTest.java

    r11974 r13274  
    33
    44import static org.junit.Assert.assertEquals;
     5import static org.junit.Assert.assertTrue;
     6
     7import java.io.IOException;
     8import java.io.InputStream;
    59
    610import org.junit.Rule;
    711import org.junit.Test;
     12import org.openstreetmap.josm.TestUtils;
    813import org.openstreetmap.josm.io.imagery.WMSImagery.WMSGetCapabilitiesException;
    914import org.openstreetmap.josm.testutils.JOSMTestRules;
     
    3641        assertEquals("bar", exc.getIncomingData());
    3742    }
     43
     44    /**
     45     * Non-regression test for bug #15730.
     46     * @throws IOException if any I/O error occurs
     47     * @throws WMSGetCapabilitiesException never
     48     */
     49    @Test
     50    public void testTicket15730() throws IOException, WMSGetCapabilitiesException {
     51        try (InputStream is = TestUtils.getRegressionDataStream(15730, "capabilities.xml")) {
     52            WMSImagery wms = new WMSImagery();
     53            wms.parseCapabilities(null, is);
     54            assertEquals(1, wms.getLayers().size());
     55            assertTrue(wms.getLayers().get(0).abstr.startsWith("South Carolina  NAIP Imagery 2017    Resolution: 100CM "));
     56        }
     57    }
    3858}
Note: See TracChangeset for help on using the changeset viewer.