mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-28 21:55:19 +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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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