@Override protected void setUp() { plugin = new TestPlugin(); ArenaType.register("arena", Arena.class, plugin); BukkitInterface.setServer(new TestBukkitServer()); plugin.onEnable(); /// Set test server MCServer.setInstance(new TestMCBukkitServer()); /// load classes BAClassesSerializer classesSerializer = new BAClassesSerializer(); classesSerializer.setConfig(new File("test_files/classes.yml")); classesSerializer.loadAll(); /// Controller bac = new BattleArenaController(null); /// Messages MessageSerializer ms = new MessageSerializer("default", null); ms.setConfig(new File("default_files/messages.yml")); MessageSerializer.setDefaultConfig(ms); AnnouncementOptions an = new AnnouncementOptions(); AnnouncementOptions.setDefaultOptions(an); /// Arenas ArenaSerializer as = new ArenaSerializer(plugin, new File("test_files/arenas.yml")); ArenaSerializer.setBAC(bac); as.loadArenas(plugin); }
@Override protected void setUp() { Defaults.TESTSERVER = true; plugin = new TestPlugin(); ArenaType.register("arena", Arena.class, plugin); BukkitInterface.setServer(new TestBukkitServer()); plugin.onEnable(); }