mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 01:08:25 +07:00
Fixed test
This commit is contained in:
@ -4,6 +4,7 @@ import com.badlogic.gdx.math.Vector2
|
|||||||
import com.unciv.logic.civilization.Civilization
|
import com.unciv.logic.civilization.Civilization
|
||||||
import com.unciv.logic.civilization.diplomacy.DiplomaticStatus
|
import com.unciv.logic.civilization.diplomacy.DiplomaticStatus
|
||||||
import com.unciv.logic.map.mapunit.MapUnit
|
import com.unciv.logic.map.mapunit.MapUnit
|
||||||
|
import com.unciv.models.ruleset.unique.UniqueType
|
||||||
import com.unciv.testing.GdxTestRunner
|
import com.unciv.testing.GdxTestRunner
|
||||||
import com.unciv.testing.TestGame
|
import com.unciv.testing.TestGame
|
||||||
import junit.framework.TestCase.assertEquals
|
import junit.framework.TestCase.assertEquals
|
||||||
@ -38,7 +39,7 @@ class BattleTest {
|
|||||||
@Test
|
@Test
|
||||||
fun `defender should withdraw from melee attack if has the unique to do so`() {
|
fun `defender should withdraw from melee attack if has the unique to do so`() {
|
||||||
// given
|
// given
|
||||||
val defenderUnit = testGame.addDefaultMeleeUnitWithUniques(attackerCiv, testGame.getTile(Vector2.Y), "May withdraw before melee ([100]%)")
|
val defenderUnit = testGame.addDefaultMeleeUnitWithUniques(attackerCiv, testGame.getTile(Vector2.Y), UniqueType.WithdrawsBeforeMeleeCombat.text)
|
||||||
defenderUnit.currentMovement = 2f
|
defenderUnit.currentMovement = 2f
|
||||||
|
|
||||||
// when
|
// when
|
||||||
|
Reference in New Issue
Block a user