Skip to content

Commit

Permalink
test: Add check test about stop animation
Browse files Browse the repository at this point in the history
  • Loading branch information
Distractic committed Dec 20, 2023
1 parent f21da9c commit 94bc53b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ class SingleGUITest : AbstractGUITest() {

@ParameterizedTest
@ValueSource(booleans = [true, false])
fun `should call update function with generic key`(result: Boolean) = runTest {
fun `should call update function with generic key`(boolean: Boolean) = runTest {
val gui = spyk(createNonFillGUI()) {
coEvery { update(Unit, result) } returns result
coEvery { update(Unit, boolean) } returns boolean
}

gui.update(result) shouldBe result
coVerify(exactly = 1) { gui.update(Unit, result) }
gui.update(boolean) shouldBe boolean
coVerify(exactly = 1) { gui.update(Unit, boolean) }
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,8 @@ class ShiftInventoryLoadingAnimationTest {
}

job.cancelAndJoin()
delay(delay)
// The inventory should not have changed after the animation is finished.
inventory.contents.toList() shouldContainExactly itemList
}
}

0 comments on commit 94bc53b

Please sign in to comment.