package osm.jp.coverage; import java.io.File; import org.junit.After; import org.junit.AfterClass; import static org.junit.Assert.fail; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import osm.jp.api.HttpPOST; import osm.jp.coverage.fuel.OsmExistFuel; public class OsmExistTest { @BeforeClass public static void setUpClass() throws Exception { } @AfterClass public static void tearDownClass() throws Exception { } @Before public void setUp() throws Exception { } @After public void tearDown() throws Exception { } @Test public void test00_main() throws Exception { try { HttpPOST.getQuery("(node(changed:\"2018-05-20T09:00:00Z\")(34.0,138.0,36.0,140.0);)->.a;\n" + "(node(newer:\"2018-05-20T09:00:00Z\")(34.0,138.0,36.0,140.0);)->.b;\n" + "(way(changed:\"2018-05-20T09:00:00Z\")(34.0,138.0,36.0,140.0);)->.c;\n" + "(way(newer:\"2018-05-20T09:00:00Z\")(34.0,138.0,36.0,140.0);)->.d;\n" + "(\n" + " node.a.b[\"amenity\"=\"fuel\"];\n" + " node.a.b[\"disused:amenity\"=\"fuel\"];\n" + " node.a.b[\"abandoned:amenity\"=\"fuel\"];\n" + " node.a.b[\"demolished:amenity\"=\"fuel\"];\n" + " node.a.b[\"historic:amenity\"=\"fuel\"];\n" + " node.a.b[\"was:amenity\"=\"fuel\"];\n" + " node.a.b[\"removed:amenity\"=\"fuel\"];\n" + " node.a.b[\"no:amenity\"=\"fuel\"];\n" + " way.c.d[\"amenity\"=\"fuel\"];\n" + " way.c.d[\"disused:amenity\"=\"fuel\"];\n" + " way.c.d[\"abandoned:amenity\"=\"fuel\"];\n" + " way.c.d[\"demolished:amenity\"=\"fuel\"];\n" + " way.c.d[\"historic:amenity\"=\"fuel\"];\n" + " way.c.d[\"was:amenity\"=\"fuel\"];\n" + " way.c.d[\"removed:amenity\"=\"fuel\"];\n" + " way.c.d[\"no:amenity\"=\"fuel\"];\n" + ");\n" + "(._;>;);\n" + "out body;"); } catch(Exception e) { fail(e.toString()); } } @Test public void test01_main() throws Exception { OsmExistFuel.main(new String[0]); } }