Search in sources :

Example 1 with OsmNoteQuestType

use of de.westnordost.streetcomplete.data.osmnotes.OsmNoteQuestType in project StreetComplete by westnordost.

the class SimpleOverpassQuestsValidityTest method testQueryValid.

public void testQueryValid() {
    List<QuestType> questTypes = QuestModule.questTypeRegistry(new OsmNoteQuestType(), null, null, null).getAll();
    for (QuestType questType : questTypes) {
        if (questType instanceof SimpleOverpassQuestType) {
            // if this fails and the returned exception is not informative, catch here and record
            // the name of the SimpleOverpassQuestType
            ((SimpleOverpassQuestType) questType).getOverpassQuery(null);
        }
    }
    // parsing the query threw no errors -> valid
    assertTrue(true);
}
Also used : QuestType(de.westnordost.streetcomplete.data.QuestType) OsmNoteQuestType(de.westnordost.streetcomplete.data.osmnotes.OsmNoteQuestType) OsmNoteQuestType(de.westnordost.streetcomplete.data.osmnotes.OsmNoteQuestType)

Aggregations

QuestType (de.westnordost.streetcomplete.data.QuestType)1 OsmNoteQuestType (de.westnordost.streetcomplete.data.osmnotes.OsmNoteQuestType)1