mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-12-30 21:07:47 +01:00
Fixed tests.
This commit is contained in:
parent
da5fab8558
commit
6203b92f2e
@ -118,6 +118,7 @@ public class ChallengesManagerTest {
|
|||||||
BentoBox plugin = mock(BentoBox.class);
|
BentoBox plugin = mock(BentoBox.class);
|
||||||
Whitebox.setInternalState(BentoBox.class, "instance", plugin);
|
Whitebox.setInternalState(BentoBox.class, "instance", plugin);
|
||||||
when(addon.getPlugin()).thenReturn(plugin);
|
when(addon.getPlugin()).thenReturn(plugin);
|
||||||
|
User.setPlugin(plugin);
|
||||||
|
|
||||||
// IWM
|
// IWM
|
||||||
when(plugin.getIWM()).thenReturn(iwm);
|
when(plugin.getIWM()).thenReturn(iwm);
|
||||||
|
@ -167,6 +167,7 @@ public class TryToCompleteTest {
|
|||||||
PowerMockito.mockStatic(Util.class);
|
PowerMockito.mockStatic(Util.class);
|
||||||
when(Util.getWorld(any())).thenReturn(world);
|
when(Util.getWorld(any())).thenReturn(world);
|
||||||
when(Util.prettifyText(anyString())).thenCallRealMethod();
|
when(Util.prettifyText(anyString())).thenCallRealMethod();
|
||||||
|
when(Util.stripSpaceAfterColorCodes(anyString())).thenCallRealMethod();
|
||||||
|
|
||||||
// Island World Manager
|
// Island World Manager
|
||||||
IslandWorldManager iwm = mock(IslandWorldManager.class);
|
IslandWorldManager iwm = mock(IslandWorldManager.class);
|
||||||
@ -252,7 +253,6 @@ public class TryToCompleteTest {
|
|||||||
// ItemFactory
|
// ItemFactory
|
||||||
ItemFactory itemFactory = mock(ItemFactory.class);
|
ItemFactory itemFactory = mock(ItemFactory.class);
|
||||||
when(Bukkit.getItemFactory()).thenReturn(itemFactory);
|
when(Bukkit.getItemFactory()).thenReturn(itemFactory);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user