Skip to content

Commit

Permalink
Fix failing unit-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Oct 4, 2022
1 parent e626987 commit 4d55b4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/test/java/world/bentobox/acidisland/AISettingsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -778,21 +778,21 @@ public void testSetDefaultGameMode() {
}

/**
* 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
public void testSetDefaultIslandFlags() {
s.setDefaultIslandFlags(Collections.singletonMap(Flags.ANIMAL_NATURAL_SPAWN, 10));
assertEquals(10, (int)s.getDefaultIslandFlags().get(Flags.ANIMAL_NATURAL_SPAWN));
s.setDefaultIslandFlagNames(Collections.singletonMap(Flags.ANIMAL_NATURAL_SPAWN.getID(), 10));
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
public void testSetDefaultIslandSettings() {
s.setDefaultIslandSettings(Collections.singletonMap(Flags.ANIMAL_NATURAL_SPAWN, 10));
assertEquals(10, (int)s.getDefaultIslandSettings().get(Flags.ANIMAL_NATURAL_SPAWN));
s.setDefaultIslandSettingNames(Collections.singletonMap(Flags.ANIMAL_NATURAL_SPAWN.getID(), 10));
assertEquals(10, (int)s.getDefaultIslandSettingNames().get(Flags.ANIMAL_NATURAL_SPAWN.getID()));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void testApplyDamageNoItemDamage() {
Item e = mock(Item.class);
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();
}

Expand All @@ -213,7 +213,7 @@ public void testApplyDamageKeepItems() {
at.setItemsInWater(map);
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();
assertTrue(map.isEmpty());
}
Expand Down

0 comments on commit 4d55b4d

Please sign in to comment.