Fixed tests.

This commit is contained in:
tastybento 2020-05-09 12:51:13 -07:00
parent da5fab8558
commit 6203b92f2e
2 changed files with 2 additions and 1 deletions

View File

@ -118,6 +118,7 @@ public class ChallengesManagerTest {
BentoBox plugin = mock(BentoBox.class);
Whitebox.setInternalState(BentoBox.class, "instance", plugin);
when(addon.getPlugin()).thenReturn(plugin);
User.setPlugin(plugin);
// IWM
when(plugin.getIWM()).thenReturn(iwm);

View File

@ -167,6 +167,7 @@ public class TryToCompleteTest {
PowerMockito.mockStatic(Util.class);
when(Util.getWorld(any())).thenReturn(world);
when(Util.prettifyText(anyString())).thenCallRealMethod();
when(Util.stripSpaceAfterColorCodes(anyString())).thenCallRealMethod();
// Island World Manager
IslandWorldManager iwm = mock(IslandWorldManager.class);
@ -252,7 +253,6 @@ public class TryToCompleteTest {
// ItemFactory
ItemFactory itemFactory = mock(ItemFactory.class);
when(Bukkit.getItemFactory()).thenReturn(itemFactory);
}
/**