Last change
on this file since 9815 was 9815, checked in by Don-vip, 8 years ago |
see #12514, see #12533 - fix/ignore longstanding problems in unit tests
|
-
Property svn:eol-style
set to
native
|
File size:
1.4 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.tools;
|
---|
3 |
|
---|
4 | import static org.junit.Assert.assertEquals;
|
---|
5 |
|
---|
6 | import org.junit.BeforeClass;
|
---|
7 | import org.junit.Ignore;
|
---|
8 | import org.junit.Test;
|
---|
9 | import org.openstreetmap.josm.JOSMFixture;
|
---|
10 |
|
---|
11 | /**
|
---|
12 | * Unit tests of {@link OverpassTurboQueryWizard} class.
|
---|
13 | */
|
---|
14 | public class OverpassTurboQueryWizardTest {
|
---|
15 |
|
---|
16 | /**
|
---|
17 | * Setup test.
|
---|
18 | */
|
---|
19 | @BeforeClass
|
---|
20 | public static void setUp() {
|
---|
21 | JOSMFixture.createUnitTestFixture().init(false);
|
---|
22 | OverpassTurboQueryWizard.getInstance();
|
---|
23 | }
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * Test key=value.
|
---|
27 | */
|
---|
28 | @Test
|
---|
29 | @Ignore("see #12514 - Test does not work with Java 7, to enable after Java 8 migration if not fixed in the meantime")
|
---|
30 | public void testKeyValue() {
|
---|
31 | final String query = OverpassTurboQueryWizard.getInstance().constructQuery("amenity=drinking_water");
|
---|
32 | assertEquals("" +
|
---|
33 | "[out:xml][timeout:25];\n" +
|
---|
34 | "(\n" +
|
---|
35 | " node[\"amenity\"=\"drinking_water\"];\n" +
|
---|
36 | " way[\"amenity\"=\"drinking_water\"];\n" +
|
---|
37 | " relation[\"amenity\"=\"drinking_water\"];\n" +
|
---|
38 | ");\n" +
|
---|
39 | "(._;>;);\n" +
|
---|
40 | "out meta;", query);
|
---|
41 | }
|
---|
42 |
|
---|
43 | /**
|
---|
44 | * Test erroneous value.
|
---|
45 | */
|
---|
46 | @Test(expected = UncheckedParseException.class)
|
---|
47 | public void testErroneous() {
|
---|
48 | OverpassTurboQueryWizard.getInstance().constructQuery("foo");
|
---|
49 | }
|
---|
50 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.