Skip to content

Commit

Permalink
Remove deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jan 2, 2022
1 parent 796114e commit 20a6846
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
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;

import java.util.UUID;

import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.OfflinePlayer;
import org.bukkit.Server;
import org.bukkit.World;
Expand Down Expand Up @@ -101,17 +98,6 @@ public void testPlayersBSkyBlockUUID() {
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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void testOnHangingPlaceAllowed() {
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"));
Expand All @@ -121,7 +121,7 @@ public void testOnHangingPlaceNotAllowed() {
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"));
Expand Down

0 comments on commit 20a6846

Please sign in to comment.