Skip to content

Commit 512b43e

Browse files
committed
tests: fix Mockito matcher type in LockAndBanListenerTest
1 parent 6937efc commit 512b43e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/test/java/world/bentobox/bentobox/listeners/flags/protection/LockAndBanListenerTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ public void testTeleportToLockedIsland() {
405405
// Make player
406406
when(player.getUniqueId()).thenReturn(uuid);
407407
// Lock island for player
408-
when(island.isAllowed(any(), eq(Flags.LOCK))).thenReturn(false);
408+
when(island.isAllowed(any(User.class), eq(Flags.LOCK))).thenReturn(false);
409409
// Simulate a teleport into an island
410410
PlayerTeleportEvent e = new PlayerTeleportEvent(player, outside, inside);
411411
// Pass to event listener
@@ -441,7 +441,7 @@ public void testLoginToLockedIsland() {
441441
when(player.getLocation()).thenReturn(inside);
442442

443443
// Lock island for player
444-
when(island.isAllowed(any(), eq(Flags.LOCK))).thenReturn(false);
444+
when(island.isAllowed(any(User.class), eq(Flags.LOCK))).thenReturn(false);
445445

446446
// Log them in
447447
listener.onPlayerLogin(new PlayerJoinEvent(player, "join message"));
@@ -470,7 +470,7 @@ public void testLoginToLockedIslandAsOp() {
470470
when(player.getLocation()).thenReturn(inside);
471471

472472
// Lock island for player
473-
when(island.isAllowed(any(), eq(Flags.LOCK))).thenReturn(false);
473+
when(island.isAllowed(any(User.class), eq(Flags.LOCK))).thenReturn(false);
474474

475475
// Log them in
476476
listener.onPlayerLogin(new PlayerJoinEvent(player, "join message"));
@@ -494,7 +494,7 @@ public void testLoginToLockedIslandWithBypassPerm() {
494494
when(player.getLocation()).thenReturn(inside);
495495

496496
// Lock island for player
497-
when(island.isAllowed(any(), eq(Flags.LOCK))).thenReturn(false);
497+
when(island.isAllowed(any(User.class), eq(Flags.LOCK))).thenReturn(false);
498498

499499
// Log them in
500500
listener.onPlayerLogin(new PlayerJoinEvent(player, "join message"));
@@ -556,7 +556,7 @@ public void testPlayerMoveIntoLockedIslandAsOp() {
556556
when(player.getLocation()).thenReturn(outside);
557557

558558
// Lock island for player
559-
when(island.isAllowed(any(), eq(Flags.LOCK))).thenReturn(false);
559+
when(island.isAllowed(any(User.class), eq(Flags.LOCK))).thenReturn(false);
560560

561561
// Move player
562562
PlayerMoveEvent e = new PlayerMoveEvent(player, outside, inside);

0 commit comments

Comments
 (0)