source: josm/trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/AudioMarkerTest.java@ 9785

Last change on this file since 9785 was 9785, checked in by Don-vip, 9 years ago

ignore last two audio unit tests to see if it fixes the regression on AudioPlayerTest.testPlay

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.layer.markerlayer;
3
4import static org.junit.Assert.assertEquals;
5
6import java.net.MalformedURLException;
7import java.net.URL;
8
9import org.junit.BeforeClass;
10import org.junit.Ignore;
11import org.junit.Test;
12import org.openstreetmap.josm.JOSMFixture;
13import org.openstreetmap.josm.data.coor.LatLon;
14import org.openstreetmap.josm.data.gpx.Extensions;
15import org.openstreetmap.josm.data.gpx.GpxConstants;
16import org.openstreetmap.josm.data.gpx.GpxData;
17import org.openstreetmap.josm.data.gpx.WayPoint;
18
19/**
20 * Unit tests of {@link AudioMarker} class.
21 */
22public class AudioMarkerTest {
23
24 /**
25 * Setup tests
26 */
27 @BeforeClass
28 public static void setUpBeforeClass() {
29 JOSMFixture.createUnitTestFixture().init();
30 }
31
32 /**
33 * Unit test of {@link AudioMarker#AudioMarker}.
34 * @throws MalformedURLException never
35 */
36 @Test
37 @Ignore("looks like it makes AudioPlayerTest.testPlay fail")
38 public void testAudioMarker() throws MalformedURLException {
39 URL url = new URL("file://something.wav");
40 AudioMarker marker = new AudioMarker(
41 LatLon.ZERO,
42 null,
43 url,
44 new MarkerLayer(new GpxData(), null, null, null),
45 1d, 2d);
46 assertEquals(url, marker.url());
47 assertEquals("2", marker.getText());
48 WayPoint wpt = marker.convertToWayPoint();
49 assertEquals(LatLon.ZERO, wpt.getCoor());
50 Extensions ext = (Extensions) wpt.get(GpxConstants.META_EXTENSIONS);
51 assertEquals("2.0", ext.get("offset"));
52 }
53}
Note: See TracBrowser for help on using the repository browser.