Skip to content

Commit

Permalink
Fix Android test after workaround in 6bbf0fb
Browse files Browse the repository at this point in the history
  • Loading branch information
FloEdelmann committed Jan 5, 2025
1 parent 6bbf0fb commit 96f2758
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,27 @@ class ElementIdProviderDaoTest : ApplicationDbTestCase() {

nodeIdSet.add(p1.nextNodeId())
nodeIdSet.add(p1.nextNodeId())
assertFailsWith<NoSuchElementException> { p1.nextNodeId() }
assertFailsWith<IndexOutOfBoundsException> { p1.nextNodeId() }

wayIdSet.add(p1.nextWayId())
wayIdSet.add(p1.nextWayId())
wayIdSet.add(p1.nextWayId())
assertFailsWith<NoSuchElementException> { p1.nextWayId() }
assertFailsWith<IndexOutOfBoundsException> { p1.nextWayId() }

assertFailsWith<NoSuchElementException> { p1.nextRelationId() }
assertFailsWith<IndexOutOfBoundsException> { p1.nextRelationId() }

dao.assign(2L, 1, 1, 2)
val p2 = dao.get(2L)

nodeIdSet.add(p2.nextNodeId())
assertFailsWith<NoSuchElementException> { p2.nextNodeId() }
assertFailsWith<IndexOutOfBoundsException> { p2.nextNodeId() }

wayIdSet.add(p2.nextWayId())
assertFailsWith<NoSuchElementException> { p2.nextWayId() }
assertFailsWith<IndexOutOfBoundsException> { p2.nextWayId() }

relationIdSet.add(p2.nextRelationId())
relationIdSet.add(p2.nextRelationId())
assertFailsWith<NoSuchElementException> { p2.nextRelationId() }
assertFailsWith<IndexOutOfBoundsException> { p2.nextRelationId() }

// test if ids are unique
assertEquals(3, nodeIdSet.size)
Expand Down

0 comments on commit 96f2758

Please sign in to comment.