mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-25 04:05:36 +01:00
Add test
This commit is contained in:
parent
a15b437249
commit
a40e9eceba
@ -621,4 +621,15 @@ public class BreakBlocksListenerTest extends AbstractCommonSetup {
|
|||||||
|
|
||||||
assertTrue(e.useInteractedBlock() == Result.ALLOW);
|
assertTrue(e.useInteractedBlock() == Result.ALLOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test method for {@link world.bentobox.bentobox.listeners.flags.protection.BreakBlocksListener#onPlayerInteract(PlayerInteractEvent)}
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testNoClick() {
|
||||||
|
PlayerInteractEvent e = mock(PlayerInteractEvent.class);
|
||||||
|
when(e.getClickedBlock()).thenReturn(null);
|
||||||
|
bbl.onPlayerInteract(e);
|
||||||
|
verify(e).getClickedBlock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user