mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-09 18:08:27 +01:00
Remove deprecated methods
This commit is contained in:
parent
796114eeef
commit
20a6846523
@ -1,9 +1,7 @@
|
||||
package world.bentobox.bentobox.database.objects;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
@ -11,7 +9,6 @@ import static org.mockito.Mockito.when;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.World;
|
||||
@ -101,17 +98,6 @@ public class PlayersTest {
|
||||
assertNotNull(new Players(plugin, UUID.randomUUID()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetHomeLocationLocation() {
|
||||
Location l = mock(Location.class);
|
||||
when(l.getWorld()).thenReturn(world);
|
||||
p.setHomeLocation(l, 5);
|
||||
assertEquals(l, p.getHomeLocation(world, 5));
|
||||
assertNotEquals(l, p.getHomeLocation(world, 0));
|
||||
p.clearHomeLocations(world);
|
||||
assertTrue(p.getHomeLocations(world).isEmpty());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeaths() {
|
||||
assertEquals(0, p.getDeaths(world));
|
||||
|
@ -106,7 +106,7 @@ public class PlaceBlocksListenerTest extends AbstractCommonSetup {
|
||||
Hanging hanging = mock(Hanging.class);
|
||||
Block block = mock(Block.class);
|
||||
when(block.getLocation()).thenReturn(location);
|
||||
HangingPlaceEvent e = new HangingPlaceEvent(hanging, player, block, BlockFace.EAST);
|
||||
HangingPlaceEvent e = new HangingPlaceEvent(hanging, player, block, BlockFace.EAST, null);
|
||||
pbl.onHangingPlace(e);
|
||||
assertFalse(e.isCancelled());
|
||||
verify(notifier, never()).notify(any(), eq("protection.protected"));
|
||||
@ -121,7 +121,7 @@ public class PlaceBlocksListenerTest extends AbstractCommonSetup {
|
||||
Hanging hanging = mock(Hanging.class);
|
||||
Block block = mock(Block.class);
|
||||
when(block.getLocation()).thenReturn(location);
|
||||
HangingPlaceEvent e = new HangingPlaceEvent(hanging, player, block, BlockFace.EAST);
|
||||
HangingPlaceEvent e = new HangingPlaceEvent(hanging, player, block, BlockFace.EAST, null);
|
||||
pbl.onHangingPlace(e);
|
||||
assertTrue(e.isCancelled());
|
||||
verify(notifier).notify(any(), eq("protection.protected"));
|
||||
|
Loading…
Reference in New Issue
Block a user