mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-22 02:25:41 +01:00
Add WorldContainer to tests, they pass again. Yay!
This commit is contained in:
parent
5159fe7a17
commit
10a4ec1c0b
@ -39,9 +39,9 @@ import com.onarandombox.MultiverseCore.utils.WorldManager;
|
||||
@PrepareForTest({ PluginManager.class, MultiverseCore.class, Permission.class, Bukkit.class, WorldManager.class })
|
||||
public class TestWorldStuff {
|
||||
|
||||
TestInstanceCreator creator;
|
||||
Server mockServer;
|
||||
CommandSender mockCommandSender;
|
||||
private TestInstanceCreator creator;
|
||||
private Server mockServer;
|
||||
private CommandSender mockCommandSender;
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
|
@ -44,6 +44,7 @@ public class TestInstanceCreator {
|
||||
|
||||
public static final File pluginDirectory = new File("bin/test/server/plugins/coretest");
|
||||
public static final File serverDirectory = new File("bin/test/server");
|
||||
public static final File worldsDirectory = new File("bin/test/server");
|
||||
|
||||
public boolean setUp() {
|
||||
try {
|
||||
@ -87,6 +88,7 @@ public class TestInstanceCreator {
|
||||
when(mockServer.getName()).thenReturn("TestBukkit");
|
||||
Logger.getLogger("Minecraft").setParent(Util.logger);
|
||||
when(mockServer.getLogger()).thenReturn(Util.logger);
|
||||
when(mockServer.getWorldContainer()).thenReturn(worldsDirectory);
|
||||
|
||||
// Give the server some worlds
|
||||
when(mockServer.getWorld(anyString())).thenAnswer(new Answer<World>() {
|
||||
|
Loading…
Reference in New Issue
Block a user