Support npc and object definitions in plugin tests

This commit is contained in:
Major
2018-08-21 00:47:23 +01:00
committed by Major-
parent 71158b3b5e
commit 86fba62ab9
10 changed files with 182 additions and 72 deletions
@@ -26,11 +26,6 @@ class BuryBoneTests {
@TestMock
lateinit var action: ActionCapture
@ItemDefinitions
fun bones(): Collection<ItemDefinition> {
return Bone.values().map { ItemDefinition(it.id) }
}
@ParameterizedTest
@EnumSource(value = Bone::class)
fun `Burying a bone should send a message`(bone: Bone) {
@@ -69,4 +64,11 @@ class BuryBoneTests {
}
}
private companion object {
@ItemDefinitions
fun bones(): Collection<ItemDefinition> {
return Bone.values().map { ItemDefinition(it.id) }
}
}
}