mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 16:49:11 +00:00
27 lines
812 B
Kotlin
27 lines
812 B
Kotlin
import io.mockk.verify
|
|
import org.apollo.game.command.Command
|
|
import org.apollo.game.model.World
|
|
import org.apollo.game.model.entity.Player
|
|
import org.apollo.game.model.entity.setting.PrivilegeLevel
|
|
import org.apollo.game.plugin.testing.junit.ApolloTestingExtension
|
|
import org.apollo.game.plugin.testing.junit.api.annotations.TestMock
|
|
import org.junit.jupiter.api.Test
|
|
import org.junit.jupiter.api.extension.ExtendWith
|
|
|
|
@ExtendWith(ApolloTestingExtension::class)
|
|
class BankCommandTests {
|
|
|
|
@TestMock
|
|
lateinit var world: World
|
|
|
|
@TestMock
|
|
lateinit var player: Player
|
|
|
|
@Test
|
|
fun `Opens bank when used`() {
|
|
player.privilegeLevel = PrivilegeLevel.ADMINISTRATOR
|
|
world.commandDispatcher.dispatch(player, Command("bank", emptyArray()))
|
|
|
|
verify { player.openBank() }
|
|
}
|
|
} |