Fix IslandSethomeCommand test

This commit is contained in:
tastybento 2021-09-25 08:07:15 -07:00
parent bc737d4d66
commit 8b474833e1

View File

@ -62,6 +62,8 @@ public class IslandSethomeCommandTest {
private Island island; private Island island;
@Mock @Mock
private IslandWorldManager iwm; private IslandWorldManager iwm;
@Mock
private WorldSettings ws;
/** /**
* @throws java.lang.Exception * @throws java.lang.Exception
@ -128,6 +130,8 @@ public class IslandSethomeCommandTest {
// Number of homes default // Number of homes default
when(iwm.getMaxHomes(any())).thenReturn(3); when(iwm.getMaxHomes(any())).thenReturn(3);
when(plugin.getIWM()).thenReturn(iwm); when(plugin.getIWM()).thenReturn(iwm);
// World settings
when(iwm.getWorldSettings(any(World.class))).thenReturn(ws);
// Number of homes // Number of homes
PowerMockito.mockStatic(Util.class); PowerMockito.mockStatic(Util.class);