diff options
Diffstat (limited to 'src/test/java/org/bukkit/PerMaterialTest.java')
-rw-r--r-- | src/test/java/org/bukkit/PerMaterialTest.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/java/org/bukkit/PerMaterialTest.java b/src/test/java/org/bukkit/PerMaterialTest.java index b727d1d4..60665f53 100644 --- a/src/test/java/org/bukkit/PerMaterialTest.java +++ b/src/test/java/org/bukkit/PerMaterialTest.java @@ -27,6 +27,7 @@ import java.util.Map; import net.minecraft.server.Block; import net.minecraft.server.Blocks; import org.bukkit.craftbukkit.util.CraftMagicNumbers; +import org.bukkit.enchantments.EnchantmentTarget; @RunWith(Parameterized.class) public class PerMaterialTest extends AbstractTestingBase { @@ -146,4 +147,13 @@ public class PerMaterialTest extends AbstractTestingBase { assertFalse(material.hasGravity()); } } + + @Test + public void usesDurability() { + if (!material.isBlock()) { + assertThat(EnchantmentTarget.BREAKABLE.includes(material), is(CraftMagicNumbers.getItem(material).usesDurability())); + } else { + assertFalse(EnchantmentTarget.BREAKABLE.includes(material)); + } + } } |