Closed wtimme closed 6 years ago
Thank you, @wtimme! This PR is amazing. Separating basic data into OverpassEntity
increases simplicity. The OverpassResponse.swift's number of lines are reduced almost by half! And the unit tests are great as well! Good job! 👏
This branch adds unit tests for XML parsers by moving the logic to dedicated categories and adding test XML files. It furthermore improves the readability in a couple of places by preferring
guard
statements over force-unwrapping optionals.For the commonly shared properties
id
andtags
, I've added superclassOverpassEntity
that all entities (nodes, ways and relations) inherit from. I'm not sure whether this is the best approach and would like to get feedback and am very open for suggestions. 👍🏼