From 281d777aa143efd040462590dafcab93ae340ccb Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 10 Mar 2024 13:55:58 -0700 Subject: [PATCH] Fix test --- .../bentobox/aoneblock/listeners/BlockProtectTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/java/world/bentobox/aoneblock/listeners/BlockProtectTest.java b/src/test/java/world/bentobox/aoneblock/listeners/BlockProtectTest.java index 596c8f0..bea766b 100644 --- a/src/test/java/world/bentobox/aoneblock/listeners/BlockProtectTest.java +++ b/src/test/java/world/bentobox/aoneblock/listeners/BlockProtectTest.java @@ -42,6 +42,7 @@ import org.powermock.modules.junit4.PowerMockRunner; import world.bentobox.aoneblock.AOneBlock; +import world.bentobox.aoneblock.Settings; import world.bentobox.bentobox.database.objects.Island; import world.bentobox.bentobox.managers.IslandsManager; @@ -89,6 +90,9 @@ public void setUp() throws Exception { when(island.getCenter()).thenReturn(location); when(im.getIslandAt(any())).thenReturn(Optional.of(island)); + // Settings + Settings settings = new Settings(); + when(addon.getSettings()).thenReturn(settings); // Class under test bp = new BlockProtect(addon); } @@ -118,7 +122,7 @@ public void testOnBlockDamage() { bp.onBlockDamage(blockDamageEvent); verify(addon).inWorld(world); verify(im).getIslandAt(location); - verify(world, times(48)).spawnParticle(eq(Particle.REDSTONE), eq(null), eq(5), + verify(world, times(80)).spawnParticle(eq(Particle.REDSTONE), eq(null), eq(5), eq(0.1D), eq(0D), eq(0.1D), eq(1D), any(Particle.DustOptions.class)); }