diff --git a/src/test/java/com/onarandombox/MultiverseCore/TestWorldProperties.java b/src/test/java/com/onarandombox/MultiverseCore/TestWorldProperties.java index bf53b71d..b74957c1 100644 --- a/src/test/java/com/onarandombox/MultiverseCore/TestWorldProperties.java +++ b/src/test/java/com/onarandombox/MultiverseCore/TestWorldProperties.java @@ -19,6 +19,7 @@ import org.bukkit.Difficulty; import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.World; +import org.bukkit.WorldType; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.configuration.file.FileConfiguration; @@ -104,6 +105,12 @@ public class TestWorldProperties { verify(mockCommandSender).sendMessage("Starting import of world 'world'..."); verify(mockCommandSender).sendMessage(ChatColor.GREEN + "Complete!"); + assertEquals(core.getServer().getWorlds().size(), 1); + assertEquals(core.getServer().getWorlds().get(0).getName(), "world"); + assertEquals(core.getServer().getWorlds().get(0).getEnvironment(), World.Environment.NORMAL); + assertEquals(core.getServer().getWorlds().get(0).getWorldType(), WorldType.NORMAL); + + // Import a second world String[] netherArgs = new String[] { "import", "world_nether", "nether" }; core.onCommand(mockCommandSender, mockCommand, "", netherArgs); @@ -111,6 +118,12 @@ public class TestWorldProperties { verify(mockCommandSender, VerificationModeFactory.times(2)).sendMessage( ChatColor.GREEN + "Complete!"); + assertEquals(core.getServer().getWorlds().size(), 2); + assertEquals(core.getServer().getWorlds().get(0).getName(), "world"); + assertEquals(core.getServer().getWorlds().get(1).getName(), "world_nether"); + assertEquals(core.getServer().getWorlds().get(1).getEnvironment(), World.Environment.NETHER); + assertEquals(core.getServer().getWorlds().get(1).getWorldType(), WorldType.NORMAL); + // //////////////////////////////////////////////// // let's set some world-properties // we can test the API with this, too :D