Search in sources :

Example 1 with OsmNoteQuestDao

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

the class OsmQuestUnlockerTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    ElementGeometryDao elementGeometryDao = mock(ElementGeometryDao.class);
    when(elementGeometryDao.get(Element.Type.NODE, 1)).thenReturn(new ElementGeometry(POS));
    osmNoteQuestDao = mock(OsmNoteQuestDao.class);
    when(osmNoteQuestDao.getAllPositions(any(BoundingBox.class))).thenReturn(Collections.emptyList());
    osmQuestDao = mock(OsmQuestDao.class);
    when(osmQuestDao.getAll(null, null, null, Element.Type.NODE, 1L)).thenReturn(Collections.emptyList());
    questType = mock(OsmElementQuestType.class);
    final List<QuestType> questTypes = Collections.singletonList(questType);
    osmQuestUnlocker = new OsmQuestUnlocker(osmNoteQuestDao, osmQuestDao, elementGeometryDao, () -> questTypes);
}
Also used : QuestType(de.westnordost.streetcomplete.data.QuestType) OsmNoteQuestDao(de.westnordost.streetcomplete.data.osmnotes.OsmNoteQuestDao) BoundingBox(de.westnordost.osmapi.map.data.BoundingBox) OsmQuestDao(de.westnordost.streetcomplete.data.osm.persist.OsmQuestDao) ElementGeometryDao(de.westnordost.streetcomplete.data.osm.persist.ElementGeometryDao)

Aggregations

BoundingBox (de.westnordost.osmapi.map.data.BoundingBox)1 QuestType (de.westnordost.streetcomplete.data.QuestType)1 ElementGeometryDao (de.westnordost.streetcomplete.data.osm.persist.ElementGeometryDao)1 OsmQuestDao (de.westnordost.streetcomplete.data.osm.persist.OsmQuestDao)1 OsmNoteQuestDao (de.westnordost.streetcomplete.data.osmnotes.OsmNoteQuestDao)1