mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-07 08:39:17 +00:00
Support npc and object definitions in plugin tests
This commit is contained in:
@@ -13,11 +13,6 @@ import org.junit.jupiter.params.provider.EnumSource
|
||||
@ExtendWith(ApolloTestingExtension::class)
|
||||
class PickaxeTests {
|
||||
|
||||
@ItemDefinitions
|
||||
fun pickaxes() = Pickaxe.values().map {
|
||||
ItemDefinition(it.id).apply { isStackable = false }
|
||||
}
|
||||
|
||||
@TestMock
|
||||
lateinit var player: Player
|
||||
|
||||
@@ -72,4 +67,11 @@ class PickaxeTests {
|
||||
assertEquals(pickaxe, Pickaxe.bestFor(player))
|
||||
}
|
||||
|
||||
private companion object {
|
||||
@ItemDefinitions
|
||||
fun pickaxes() = Pickaxe.values().map {
|
||||
ItemDefinition(it.id).apply { isStackable = false }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user