use of mage.server.util.ConfigWrapper in project mage by magefree.
the class CustomTestCard method init.
@BeforeClass
public static void init() {
Logger.getRootLogger().setLevel(Level.DEBUG);
logger.debug("Starting MAGE tests");
logger.debug("Logging level: " + logger.getLevel());
logger.debug("Default charset: " + Charset.defaultCharset());
// one time init for all tests
if (GameFactory.instance.getGameTypes().isEmpty()) {
deleteSavedGames();
ConfigSettings config = new ConfigWrapper(ConfigFactory.loadFromFile("config/config.xml"));
for (GamePlugin plugin : config.getGameTypes()) {
GameFactory.instance.addGameType(plugin.getName(), loadGameType(plugin), loadPlugin(plugin));
}
Copier.setLoader(classLoader);
}
}
use of mage.server.util.ConfigWrapper in project mage by magefree.
the class MageTestBase method init.
@BeforeClass
public static void init() {
Logger.getRootLogger().setLevel(Level.DEBUG);
// one time init for all tests
if (GameFactory.instance.getGameTypes().isEmpty()) {
deleteSavedGames();
ConfigSettings config = new ConfigWrapper(ConfigFactory.loadFromFile("config/config.xml"));
config.getGameTypes().forEach((gameType) -> {
GameFactory.instance.addGameType(gameType.getName(), loadGameType(gameType), loadPlugin(gameType));
});
config.getTournamentTypes().forEach((tournamentType) -> {
TournamentFactory.instance.addTournamentType(tournamentType.getName(), loadTournamentType(tournamentType), loadPlugin(tournamentType));
});
config.getPlayerTypes().forEach((playerType) -> {
PlayerFactory.instance.addPlayerType(playerType.getName(), loadPlugin(playerType));
});
// for (Plugin plugin : config.getDeckTypes()) {
// DeckValidatorFactory.getInstance().addDeckType(plugin.getName(), loadPlugin(plugin));
// }
Copier.setLoader(classLoader);
}
}
Aggregations