use of de.westnordost.streetcomplete.data.statistics.QuestStatisticsDao in project StreetComplete by westnordost.
the class OsmQuestChangesUploadTest method testUploadNormally.
public void testUploadNormally() {
OsmQuest quest = createAnsweredQuestWithAppliableChange();
Element element = createElement();
OsmQuestDao questDb = mock(OsmQuestDao.class);
MapDataDao mapDataDao = mock(MapDataDao.class);
QuestStatisticsDao statisticsDao = mock(QuestStatisticsDao.class);
MergedElementDao elementDb = mock(MergedElementDao.class);
OsmQuestUnlocker osmQuestUnlocker = mock(OsmQuestUnlocker.class);
OsmQuestChangesUpload u = new OsmQuestChangesUpload(mapDataDao, questDb, elementDb, null, statisticsDao, null, null, null, null, osmQuestUnlocker);
assertTrue(u.uploadQuestChange(1, quest, element, false, false));
assertEquals(QuestStatus.CLOSED, quest.getStatus());
verify(statisticsDao).addOne("TestQuestType");
}
Aggregations