Remove deprecated methods

This commit is contained in:
tastybento 2022-01-01 18:05:40 -08:00
parent 796114eeef
commit 20a6846523
2 changed files with 2 additions and 16 deletions

View File

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

View File

@ -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"));