mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-28 05:35:44 +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;
|
||||
@ -70,6 +72,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);
|
||||
|
Loading…
Reference in New Issue
Block a user