NPE's fixed. Tests need to be fixed now.

This commit is contained in:
tastybento 2018-08-16 08:53:31 -07:00
parent bd2cc1b63e
commit 3f7198da25

View File

@ -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);