mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-21 16:47:39 +01:00
Tried to fix SettingsToggleClickListenerTest
This commit is contained in:
parent
8ee42d3c47
commit
62a321caf1
@ -5,6 +5,7 @@ import static org.mockito.Mockito.when;
|
|||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
@ -52,7 +53,6 @@ public class SettingsToggleClickListenerTest {
|
|||||||
when(iwm.getPermissionPrefix(Mockito.any())).thenReturn("bskyblock");
|
when(iwm.getPermissionPrefix(Mockito.any())).thenReturn("bskyblock");
|
||||||
when(plugin.getIWM()).thenReturn(iwm);
|
when(plugin.getIWM()).thenReturn(iwm);
|
||||||
|
|
||||||
|
|
||||||
listener = new WorldToggleClickListener("test");
|
listener = new WorldToggleClickListener("test");
|
||||||
|
|
||||||
panel = mock(Panel.class);
|
panel = mock(Panel.class);
|
||||||
@ -61,6 +61,7 @@ public class SettingsToggleClickListenerTest {
|
|||||||
user = mock(User.class);
|
user = mock(User.class);
|
||||||
when(user.getWorld()).thenReturn(mock(World.class));
|
when(user.getWorld()).thenReturn(mock(World.class));
|
||||||
when(user.getLocation()).thenReturn(mock(Location.class));
|
when(user.getLocation()).thenReturn(mock(Location.class));
|
||||||
|
when(user.getPlayer()).thenReturn(mock(Player.class));
|
||||||
PowerMockito.mockStatic(Util.class);
|
PowerMockito.mockStatic(Util.class);
|
||||||
when(Util.getWorld(Mockito.any())).thenReturn(mock(World.class));
|
when(Util.getWorld(Mockito.any())).thenReturn(mock(World.class));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user