test for game hangs when computer cant find card in library

This commit is contained in:
Loki 2011-12-26 17:30:55 +04:00
parent fa9f6115cf
commit dfddc70984
2 changed files with 22 additions and 0 deletions

View file

@ -60,6 +60,7 @@ public class GuulDrazAssassin extends LevelerCard<GuulDrazAssassin> {
this.color.setBlack(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
this.addAbility(new LevelUpAbility(new ManaCostsImpl("{1}{B}")));
Abilities<Ability> abilities1 = new AbilitiesImpl<Ability>();
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BoostTargetEffect(-2, -2, Constants.Duration.EndOfTurn), new ManaCostsImpl("{B}"));

View file

@ -0,0 +1,21 @@
package org.mage.test.ai.bugs;
import junit.framework.Assert;
import mage.Constants;
import mage.game.permanent.Permanent;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestBase;
public class BugCantFindCardInLibrary extends CardTestBase {
@Test
public void testWithSquadronHawk() {
addCard(Constants.Zone.HAND, playerA, "Squadron Hawk");
addCard(Constants.Zone.BATTLEFIELD, playerA, "Plains");
addCard(Constants.Zone.BATTLEFIELD, playerA, "Plains");
execute();
Permanent merfolk = getPermanent("Squadron Hawk", playerA.getId());
Assert.assertNotNull(merfolk);
}
}