Fixed cards that broken whole server (see #4402)

This commit is contained in:
Oleg Agafonov 2018-01-12 21:23:49 +04:00
parent 7c2511355e
commit af113d4ed1
4 changed files with 16 additions and 11 deletions

View file

@ -63,6 +63,16 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
UNKNOWN
}
public CardTestPlayerAPIImpl(){
// load all cards to db from class list
ArrayList<String> errorsList = new ArrayList<>();
CardScanner.scan(errorsList);
if (errorsList.size() > 0) {
Assert.fail("Found errors on card loading: " + '\n' + errorsList.stream().collect(Collectors.joining("\n")));
}
}
/**
* Default game initialization params for red player (that plays with
* Mountains)
@ -108,17 +118,6 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
addCard(Zone.LIBRARY, playerB, "Plains", 10);
}
@Before
public void checkDatabase() {
// load all cards to db from class list
ArrayList<String> errorsList = new ArrayList<>();
CardScanner.scan(errorsList);
if (errorsList.size() > 0) {
Assert.fail("Found errors on card loading: " + '\n' + errorsList.stream().collect(Collectors.joining("\n")));
}
}
@Before
public void reset() throws GameException, FileNotFoundException {
if (currentGame != null) {