Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Mar 10, 2024
1 parent 320910c commit 281d777
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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));
}

Expand Down

0 comments on commit 281d777

Please sign in to comment.