Skip to content

Commit

Permalink
Removed inline classes closes #46
Browse files Browse the repository at this point in the history
  • Loading branch information
GregHib committed May 4, 2020
1 parent e8a153a commit 8c2c1fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -49,7 +49,7 @@ internal class EntityListTest {
list[10, 20, 1]
// Then
verifyOrder {
// list[any<Tile>()] FIXME https://github.com/mockk/mockk/issues/152
list[any<Tile>()]
list[hash]
}
}
Expand All @@ -68,7 +68,7 @@ internal class EntityListTest {
list.add(10, 20, 1, entity)
// Then
verifyOrder {
// list.add(any<Tile>(), entity)
list.add(any<Tile>(), entity)
list.add(hash, entity)
}
}
Expand All @@ -95,7 +95,6 @@ internal class EntityListTest {
list[10, 20, 1] = entity
// Then
verifyOrder {
// list[any<Tile>()] = entity
list.add(hash, entity)
}
}
Expand All @@ -114,7 +113,7 @@ internal class EntityListTest {
list.remove(10, 20, 1, entity)
// Then
verifyOrder {
// list.remove(any<Tile>(), entity)
list.remove(any<Tile>(), entity)
list.remove(hash, entity)
}
}
Expand Down
Expand Up @@ -214,9 +214,10 @@ internal class ViewportTaskTest : KoinMock() {
val counter = AtomicInteger(0)

fun addEntity(x: Int, y: Int, plane: Int): NPC {
// val npc: NPC = mockk(relaxed = true)// FIXME #46 can't mock tile
val npc: NPC = mockk(relaxed = true)
val tile = Tile(x, y, plane)
val npc = NPC(counter.getAndIncrement(), tile)
every { npc.index } returns counter.getAndIncrement()
every { npc.tile } returns tile
return npc
}

Expand Down

0 comments on commit 8c2c1fb

Please sign in to comment.