Search in sources :

Example 1 with TestQuestType5

use of de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType5 in project StreetComplete by westnordost.

the class OsmQuestDaoTest method testGetNextNewAt.

public void testGetNextNewAt() {
    ElementGeometry geom = new ElementGeometry(new OsmLatLon(5, 5));
    OsmQuest quest = createNewQuest(new TestQuestType(), 1, Element.Type.NODE, geom);
    quest.setStatus(QuestStatus.ANSWERED);
    addToDaos(quest, createNewQuest(new TestQuestType2(), 1, Element.Type.NODE, geom), createNewQuest(new TestQuestType3(), 1, Element.Type.NODE, geom), createNewQuest(new TestQuestType4(), 1, Element.Type.NODE, geom), createNewQuest(new TestQuestType5(), 1, Element.Type.NODE, geom));
    OsmQuest nextQuest = dao.getNextNewAt(1, Arrays.asList("TestQuestType4", "TestQuestType3", "TestQuestType5"));
    assertEquals(nextQuest.getType().getClass().getSimpleName(), "TestQuestType4");
}
Also used : ElementGeometry(de.westnordost.streetcomplete.data.osm.ElementGeometry) OsmLatLon(de.westnordost.osmapi.map.data.OsmLatLon) OsmQuest(de.westnordost.streetcomplete.data.osm.OsmQuest) TestQuestType5(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType5) TestQuestType4(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType4) TestQuestType3(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType3) TestQuestType(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType) TestQuestType2(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType2)

Example 2 with TestQuestType5

use of de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType5 in project StreetComplete by westnordost.

the class OsmQuestDaoTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    geometryDao = new ElementGeometryDao(dbHelper, serializer);
    List<QuestType> list = new ArrayList<>();
    list.add(new TestQuestType());
    list.add(new TestQuestType2());
    list.add(new TestQuestType3());
    list.add(new TestQuestType4());
    list.add(new TestQuestType5());
    dao = new OsmQuestDao(dbHelper, serializer, new QuestTypeRegistry(list));
}
Also used : TestQuestType(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType) OsmElementQuestType(de.westnordost.streetcomplete.data.osm.OsmElementQuestType) QuestType(de.westnordost.streetcomplete.data.QuestType) ArrayList(java.util.ArrayList) TestQuestType5(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType5) QuestTypeRegistry(de.westnordost.streetcomplete.data.QuestTypeRegistry) TestQuestType4(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType4) TestQuestType3(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType3) TestQuestType(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType) TestQuestType2(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType2)

Example 3 with TestQuestType5

use of de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType5 in project StreetComplete by westnordost.

the class QuestTypeOrderListTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    one = new TestQuestType();
    two = new TestQuestType2();
    three = new TestQuestType3();
    four = new TestQuestType4();
    five = new TestQuestType5();
    list = new ArrayList<>();
    list.addAll(Arrays.asList(one, two, three, four, five));
    questTypeOrderList = new QuestTypeOrderList(getContext().getSharedPreferences("Test", Context.MODE_PRIVATE), new QuestTypeRegistry(list));
    questTypeOrderList.clear();
}
Also used : TestQuestType5(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType5) QuestTypeRegistry(de.westnordost.streetcomplete.data.QuestTypeRegistry) TestQuestType4(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType4) TestQuestType3(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType3) TestQuestType(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType) TestQuestType2(de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType2)

Aggregations

TestQuestType (de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType)3 TestQuestType2 (de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType2)3 TestQuestType3 (de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType3)3 TestQuestType4 (de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType4)3 TestQuestType5 (de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType5)3 QuestTypeRegistry (de.westnordost.streetcomplete.data.QuestTypeRegistry)2 OsmLatLon (de.westnordost.osmapi.map.data.OsmLatLon)1 QuestType (de.westnordost.streetcomplete.data.QuestType)1 ElementGeometry (de.westnordost.streetcomplete.data.osm.ElementGeometry)1 OsmElementQuestType (de.westnordost.streetcomplete.data.osm.OsmElementQuestType)1 OsmQuest (de.westnordost.streetcomplete.data.osm.OsmQuest)1 ArrayList (java.util.ArrayList)1