mirror of
https://github.com/BentoBoxWorld/AcidIsland.git
synced 2024-11-29 14:15:53 +01:00
Adjust test to use latest API
This commit is contained in:
parent
198cc66319
commit
466fafddea
@ -60,13 +60,14 @@ import world.bentobox.bentobox.managers.CommandsManager;
|
|||||||
import world.bentobox.bentobox.managers.FlagsManager;
|
import world.bentobox.bentobox.managers.FlagsManager;
|
||||||
import world.bentobox.bentobox.managers.IslandWorldManager;
|
import world.bentobox.bentobox.managers.IslandWorldManager;
|
||||||
import world.bentobox.bentobox.managers.IslandsManager;
|
import world.bentobox.bentobox.managers.IslandsManager;
|
||||||
|
import world.bentobox.bentobox.managers.RanksManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author tastybento
|
* @author tastybento
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@RunWith(PowerMockRunner.class)
|
@RunWith(PowerMockRunner.class)
|
||||||
@PrepareForTest({ Bukkit.class, BentoBox.class, User.class, Config.class, DatabaseSetup.class })
|
@PrepareForTest({ Bukkit.class, BentoBox.class, User.class, Config.class, DatabaseSetup.class, RanksManager.class })
|
||||||
public class AcidIslandTest {
|
public class AcidIslandTest {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,6 +87,8 @@ public class AcidIslandTest {
|
|||||||
private FlagsManager fm;
|
private FlagsManager fm;
|
||||||
@Mock
|
@Mock
|
||||||
private Settings settings;
|
private Settings settings;
|
||||||
|
@Mock
|
||||||
|
private RanksManager rm;
|
||||||
|
|
||||||
private static AbstractDatabaseHandler<Object> h;
|
private static AbstractDatabaseHandler<Object> h;
|
||||||
|
|
||||||
@ -130,6 +133,8 @@ public class AcidIslandTest {
|
|||||||
// Set up plugin
|
// Set up plugin
|
||||||
Whitebox.setInternalState(BentoBox.class, "instance", plugin);
|
Whitebox.setInternalState(BentoBox.class, "instance", plugin);
|
||||||
when(plugin.getLogger()).thenReturn(Logger.getAnonymousLogger());
|
when(plugin.getLogger()).thenReturn(Logger.getAnonymousLogger());
|
||||||
|
|
||||||
|
Whitebox.setInternalState(RanksManager.class, "instance", rm);
|
||||||
// Command manager
|
// Command manager
|
||||||
CommandsManager cm = mock(CommandsManager.class);
|
CommandsManager cm = mock(CommandsManager.class);
|
||||||
when(plugin.getCommandsManager()).thenReturn(cm);
|
when(plugin.getCommandsManager()).thenReturn(cm);
|
||||||
@ -201,6 +206,7 @@ public class AcidIslandTest {
|
|||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
when(plugin.getSettings()).thenReturn(settings);
|
when(plugin.getSettings()).thenReturn(settings);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user