// License: GPL. For details, see LICENSE file. package org.openstreetmap.josm.gui.layer.markerlayer; import static org.junit.Assert.assertEquals; import java.net.MalformedURLException; import java.net.URL; import org.junit.BeforeClass; import org.junit.Test; import org.openstreetmap.josm.JOSMFixture; import org.openstreetmap.josm.data.coor.LatLon; import org.openstreetmap.josm.data.gpx.GpxData; import org.openstreetmap.josm.data.gpx.WayPoint; /** * Unit tests of {@link WebMarker} class. */ public class WebMarkerTest { /** * Setup tests */ @BeforeClass public static void setUpBeforeClass() { JOSMFixture.createUnitTestFixture().init(); } /** * Unit test of {@link WebMarker#WebMarker}. * @throws MalformedURLException never */ @Test public void testWebMarker() throws MalformedURLException { WebMarker marker = new WebMarker( LatLon.ZERO, new URL("http://something.com"), new MarkerLayer(new GpxData(), null, null, null), 1d, 2d); marker.actionPerformed(null); assertEquals("", marker.getText()); WayPoint wpt = marker.convertToWayPoint(); assertEquals(LatLon.ZERO, wpt.getCoor()); } }