forked from streetcomplete/StreetComplete
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in tests of Housenumber query use OSM data as it was at specified time
currently live data is used, as result tests may be broken by OSM edits note new test_unspecified_building_type_is_excluded - this test fails with the curent OSM data, but it is working for specified point of time this increases complexity of code, but it should be preferable to tests failing because OSM data changed I plan on using the same method for unit tests for streetcomplete#920
- Loading branch information
1 parent
d736773
commit 23f09f6
Showing
3 changed files
with
56 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...Test/java/de/westnordost/streetcomplete/quests/add_housenumber/AddHousenumberOldData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package de.westnordost.streetcomplete.quests.add_housenumber; | ||
|
||
import de.westnordost.osmapi.map.data.BoundingBox; | ||
import de.westnordost.streetcomplete.data.osm.download.OverpassMapDataDao; | ||
import de.westnordost.streetcomplete.quests.housenumber.AddHousenumber; | ||
|
||
|
||
public class AddHousenumberOldData extends AddHousenumber { | ||
private String date; | ||
AddHousenumberOldData(OverpassMapDataDao overpassServer, String date) { | ||
super(overpassServer); | ||
this.date = date; | ||
} | ||
|
||
private String atticDataRequest(){ | ||
return "[date:\"" + date + "\"]"; | ||
} | ||
|
||
protected String getBuildingsWithoutAddressesOverpassQuery(BoundingBox bbox){ | ||
return atticDataRequest() + ";" + super.getBuildingsWithoutAddressesOverpassQuery(bbox); | ||
} | ||
|
||
protected String getFreeFloatingAddressesOverpassQuery(BoundingBox bbox){ | ||
return atticDataRequest() + super.getFreeFloatingAddressesOverpassQuery(bbox); | ||
} | ||
|
||
protected String getNonBuildingAreasWithAddressesQuery(BoundingBox bbox){ | ||
return atticDataRequest() + super.getNonBuildingAreasWithAddressesQuery(bbox); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters