MCPcopy Create free account
hub / github.com/comaps/comaps / DeleteOSMNodeIfExists

Function DeleteOSMNodeIfExists

libs/editor/osm_auth_tests/server_api_test.cpp:59–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57} // namespace
58
59void 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
75UNIT_TEST(OSM_ServerAPI_ChangesetAndNode)
76{

Callers 1

UNIT_TESTFunction · 0.85

Calls 3

DeleteElementMethod · 0.80
XMLFeatureClass · 0.50

Tested by

no test coverage detected