mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-28 13:45:14 +01:00
NPE's fixed. Tests need to be fixed now.
This commit is contained in:
parent
bd2cc1b63e
commit
3f7198da25
@ -14,9 +14,11 @@ import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@ -71,6 +73,13 @@ public class EnterExitListenerTest {
|
||||
// World
|
||||
World world = mock(World.class);
|
||||
|
||||
// Server
|
||||
Server server = mock(Server.class);
|
||||
PowerMockito.mockStatic(Bukkit.class);
|
||||
when(Bukkit.getServer()).thenReturn(server);
|
||||
PluginManager pim = mock(PluginManager.class);
|
||||
when(server.getPluginManager()).thenReturn(pim);
|
||||
|
||||
// Settings
|
||||
Settings s = mock(Settings.class);
|
||||
when(plugin.getSettings()).thenReturn(s);
|
||||
|
Loading…
Reference in New Issue
Block a user