This commit is contained in:
tastybento 2024-09-21 17:21:24 -07:00
parent a15b437249
commit a40e9eceba

View File

@ -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();
}
} }