Little improves for tests

This commit is contained in:
Oleg Agafonov 2020-06-26 18:58:13 +04:00
parent e73a11cb12
commit 329f7fd609
5 changed files with 15 additions and 14 deletions

View file

@ -1,5 +1,4 @@
package org.mage.test.cards.abilities.abilitywords;
package org.mage.test.cards.abilities.keywords;
import mage.constants.PhaseStep;
import mage.constants.Zone;
@ -7,7 +6,6 @@ import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
*
* @author LevelX2
*/
public class ConvergeTest extends CardTestPlayerBase {

View file

@ -1,5 +1,4 @@
package org.mage.test.cards.abilities.abilitywords;
package org.mage.test.cards.abilities.keywords;
import mage.constants.PhaseStep;
import mage.constants.Zone;
@ -7,7 +6,6 @@ import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
*
* @author LevelX2
*/
public class DomainTest extends CardTestPlayerBase {

View file

@ -1,5 +1,4 @@
package org.mage.test.cards.abilities.abilitywords;
package org.mage.test.cards.abilities.keywords;
import mage.constants.PhaseStep;
import mage.constants.Zone;
@ -7,7 +6,6 @@ import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
*
* @author LevelX2
*/
public class RevoltTest extends CardTestPlayerBase {

View file

@ -51,7 +51,8 @@ import java.util.stream.Collectors;
*/
public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implements CardTestAPI {
private static final boolean FAST_SCAN_WITHOUT_DATABASE_CREATE = false; // DEBUG only, enable it to fast startup tests without database create
// DEBUG only, enable it to fast startup tests without database create (delete \db\ folder to force db recreate)
private static final boolean FAST_SCAN_WITHOUT_DATABASE_CREATE = false;
public static final String ALIAS_PREFIX = "@"; // don't change -- it uses in user's tests
public static final String CHECK_PARAM_DELIMETER = "#";
@ -137,7 +138,7 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
public CardTestPlayerAPIImpl() {
// load all cards to db from class list
ArrayList<String> errorsList = new ArrayList<>();
if (FAST_SCAN_WITHOUT_DATABASE_CREATE) {
if (FAST_SCAN_WITHOUT_DATABASE_CREATE && CardRepository.instance.findCard("Mountain") != null) {
CardScanner.scanned = true;
}
CardScanner.scan(errorsList);