mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-02 21:41:45 +01:00
Fix for test class
This commit is contained in:
parent
7cf71a4365
commit
4e4f9880d8
@ -46,7 +46,6 @@ import world.bentobox.bentobox.util.Util;
|
|||||||
* @author tastybento
|
* @author tastybento
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Ignore("Paper API update required")
|
|
||||||
@RunWith(PowerMockRunner.class)
|
@RunWith(PowerMockRunner.class)
|
||||||
@PrepareForTest({Bukkit.class, BentoBox.class, Util.class, ServerBuildInfo.class})
|
@PrepareForTest({Bukkit.class, BentoBox.class, Util.class, ServerBuildInfo.class})
|
||||||
public class BlockInteractionListenerTest extends AbstractCommonSetup {
|
public class BlockInteractionListenerTest extends AbstractCommonSetup {
|
||||||
@ -130,8 +129,6 @@ public class BlockInteractionListenerTest extends AbstractCommonSetup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
@ -147,7 +144,9 @@ public class BlockInteractionListenerTest extends AbstractCommonSetup {
|
|||||||
when(item.getType()).thenReturn(Material.AIR);
|
when(item.getType()).thenReturn(Material.AIR);
|
||||||
when(mockPlayer.getInventory()).thenReturn(inv);
|
when(mockPlayer.getInventory()).thenReturn(inv);
|
||||||
when(inv.getItemInMainHand()).thenReturn(item);
|
when(inv.getItemInMainHand()).thenReturn(item);
|
||||||
when(inv.getItemInOffHand()).thenReturn(new ItemStack(Material.BUCKET));
|
ItemStack mockBucket = mock(ItemStack.class);
|
||||||
|
when(mockBucket.getType()).thenReturn(Material.BUCKET);
|
||||||
|
when(inv.getItemInOffHand()).thenReturn(mockBucket);
|
||||||
|
|
||||||
// FlagsManager
|
// FlagsManager
|
||||||
setFlags();
|
setFlags();
|
||||||
|
Loading…
Reference in New Issue
Block a user