| 57 | } // namespace |
| 58 | |
| 59 | void DeleteOSMNodeIfExists(ServerApi06 const & api, uint64_t changeSetId, ms::LatLon const & ll) |
| 60 | { |
| 61 | // Delete all test nodes left on the server (if any). |
| 62 | auto const response = api.GetXmlFeaturesAtLatLon(ll, 1.0); |
| 63 | TEST_EQUAL(response.first, OsmOAuth::HTTP::OK, ()); |
| 64 | xml_document reply; |
| 65 | reply.load_string(response.second.c_str()); |
| 66 | // Response can be empty, and it's ok. |
| 67 | for (pugi::xml_node node : reply.child("osm").children("node")) |
| 68 | { |
| 69 | node.attribute("changeset") = changeSetId; |
| 70 | node.remove_child("tag"); |
| 71 | TEST_NO_THROW(api.DeleteElement(editor::XMLFeature(node)), ()); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | UNIT_TEST(OSM_ServerAPI_ChangesetAndNode) |
| 76 | { |
no test coverage detected