Search in sources :

Example 1 with UserDao

use of de.westnordost.osmapi.user.UserDao in project StreetComplete by westnordost.

the class UserChangesetsDaoTest method testAmount.

public void testAmount() {
    OsmConnection osm = new OsmConnection("https://master.apis.dev.openstreetmap.org/api/0.6/", "StreetComplete test case", null);
    long userId = 12;
    UserDao userDao = new UserDao(osm);
    UserInfo info = userDao.get(userId);
    UserChangesetsDao dao = new UserChangesetsDao(new ChangesetsDao(osm));
    Counter counter = new Counter();
    dao.findAll(counter, userId, new Date(0));
    assertEquals(info.changesetsCount, counter.count);
}
Also used : UserDao(de.westnordost.osmapi.user.UserDao) OsmConnection(de.westnordost.osmapi.OsmConnection) ChangesetsDao(de.westnordost.osmapi.changesets.ChangesetsDao) UserInfo(de.westnordost.osmapi.user.UserInfo) Date(java.util.Date)

Aggregations

OsmConnection (de.westnordost.osmapi.OsmConnection)1 ChangesetsDao (de.westnordost.osmapi.changesets.ChangesetsDao)1 UserDao (de.westnordost.osmapi.user.UserDao)1 UserInfo (de.westnordost.osmapi.user.UserInfo)1 Date (java.util.Date)1