Fix failing unit-tests (#129)

* Version 1.15.2 (#118)

* Add support for 1.16.5

* Fix failing unit-tests

Co-authored-by: tastybento <tastybento@users.noreply.github.com>
This commit is contained in:
BONNe 2022-10-04 15:19:46 +03:00 committed by GitHub
parent 0e3db2b696
commit 9e21d9dc86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -778,21 +778,21 @@ public class AISettingsTest {
} }
/** /**
* Test method for {@link world.bentobox.acidisland.AISettings#setDefaultIslandFlags(java.util.Map)}. * Test method for {@link world.bentobox.acidisland.AISettings#setDefaultIslandFlagNames(java.util.Map)}.
*/ */
@Test @Test
public void testSetDefaultIslandFlags() { public void testSetDefaultIslandFlags() {
s.setDefaultIslandFlags(Collections.singletonMap(Flags.ANIMAL_NATURAL_SPAWN, 10)); s.setDefaultIslandFlagNames(Collections.singletonMap(Flags.ANIMAL_NATURAL_SPAWN.getID(), 10));
assertEquals(10, (int)s.getDefaultIslandFlags().get(Flags.ANIMAL_NATURAL_SPAWN)); assertEquals(10, (int)s.getDefaultIslandFlagNames().get(Flags.ANIMAL_NATURAL_SPAWN.getID()));
} }
/** /**
* Test method for {@link world.bentobox.acidisland.AISettings#setDefaultIslandSettings(java.util.Map)}. * Test method for {@link world.bentobox.acidisland.AISettings#setDefaultIslandSettingNames(java.util.Map)}.
*/ */
@Test @Test
public void testSetDefaultIslandSettings() { public void testSetDefaultIslandSettings() {
s.setDefaultIslandSettings(Collections.singletonMap(Flags.ANIMAL_NATURAL_SPAWN, 10)); s.setDefaultIslandSettingNames(Collections.singletonMap(Flags.ANIMAL_NATURAL_SPAWN.getID(), 10));
assertEquals(10, (int)s.getDefaultIslandSettings().get(Flags.ANIMAL_NATURAL_SPAWN)); assertEquals(10, (int)s.getDefaultIslandSettingNames().get(Flags.ANIMAL_NATURAL_SPAWN.getID()));
} }

View File

@ -190,7 +190,7 @@ public class AcidTaskTest {
Item e = mock(Item.class); Item e = mock(Item.class);
at.applyDamage(e, 0); at.applyDamage(e, 0);
verify(world, never()).playSound(any(), any(Sound.class), anyFloat(), anyFloat()); verify(world, never()).playSound(any(Location.class), any(Sound.class), anyFloat(), anyFloat());
verify(e, never()).remove(); verify(e, never()).remove();
} }
@ -213,7 +213,7 @@ public class AcidTaskTest {
at.setItemsInWater(map); at.setItemsInWater(map);
at.applyDamage(e, 0); at.applyDamage(e, 0);
verify(world, never()).playSound(any(), any(Sound.class), anyFloat(), anyFloat()); verify(world, never()).playSound(any(Location.class), any(Sound.class), anyFloat(), anyFloat());
verify(e, never()).remove(); verify(e, never()).remove();
assertTrue(map.isEmpty()); assertTrue(map.isEmpty());
} }