Tests: added additional test for modern format validation (related to 8d0efaabc9)

This commit is contained in:
Oleg Agafonov 2021-05-15 20:34:08 +04:00
parent fc219f29a4
commit 6ede79aa1f

View file

@ -229,6 +229,30 @@ public class DeckValidatorTest extends MageTestBase {
assertCounterspellValid(deckList); assertCounterspellValid(deckList);
} }
private void assertPsychatogValid(ArrayList<CardNameAmount> deckList) {
// if that card will be valid in modern then you must replace it with another non valid card
// google for "Cards Wizards Should Reprint for Modern"
final boolean needValid = false;
boolean valid = testDeckValid(new Modern(), deckList);
if (valid != needValid) {
Assert.fail("Psychatog " + (needValid ? "must be" : "not") + " allowed in modern");
}
}
@Test
public void testModernPsychatog() {
// test non valid card
ArrayList<CardNameAmount> deckList = new ArrayList<>();
deckList.add(new CardNameAmount("ODY", 292, 4));
deckList.add(new CardNameAmount("Mountain", 56));
assertPsychatogValid(deckList);
deckList.clear();
deckList.add(new CardNameAmount("VMA", 258, 4));
deckList.add(new CardNameAmount("Mountain", 56));
assertPsychatogValid(deckList);
}
@Test @Test
public void testModernBanned() { public void testModernBanned() {
ArrayList<CardNameAmount> deckList = new ArrayList<>(); ArrayList<CardNameAmount> deckList = new ArrayList<>();