Add additional command test coverage

This commit is contained in:
Gary Tierney
2018-09-04 02:35:35 +01:00
parent 21fea83c8e
commit fc1d6f46fa
10 changed files with 210 additions and 7 deletions
@@ -2,6 +2,7 @@ package org.apollo.game.plugin.testing.junit.api.annotations
annotation class Id(val value: Int)
annotation class Pos(val x: Int, val y: Int, val height: Int = 0)
annotation class Name(val value: String)
@Target(AnnotationTarget.FIELD)
@Retention(AnnotationRetention.RUNTIME)
@@ -1,6 +1,7 @@
package org.apollo.game.plugin.testing.junit.stubs
import org.apollo.game.model.Position
import org.apollo.game.plugin.testing.junit.api.annotations.Name
import org.apollo.game.plugin.testing.junit.api.annotations.Pos
class PlayerStubInfo {
@@ -10,6 +11,7 @@ class PlayerStubInfo {
annotations.forEach {
when (it) {
is Name -> info.name = it.value
is Pos -> info.position = Position(it.x, it.y, it.height)
}
}