summaryrefslogtreecommitdiffstats
path: root/src/test/java/org/bukkit
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-07-08 12:51:32 +1000
committermd_5 <git@md-5.net>2016-07-08 12:51:32 +1000
commit9c02c121791427c4608af3fab36d4c01a4ed8faa (patch)
treea7e73825e0b28fe6bf7f37985c2115b3de8674a9 /src/test/java/org/bukkit
parente3b4dd3d9a663d5e76a9c9fdd026cbf9f199dc38 (diff)
downloadcraftbukkit-9c02c121791427c4608af3fab36d4c01a4ed8faa.tar
craftbukkit-9c02c121791427c4608af3fab36d4c01a4ed8faa.tar.gz
craftbukkit-9c02c121791427c4608af3fab36d4c01a4ed8faa.tar.lz
craftbukkit-9c02c121791427c4608af3fab36d4c01a4ed8faa.tar.xz
craftbukkit-9c02c121791427c4608af3fab36d4c01a4ed8faa.zip
SPIGOT-2481: Implement EnchantmentTarget.BREAKABLE
Diffstat (limited to 'src/test/java/org/bukkit')
-rw-r--r--src/test/java/org/bukkit/PerMaterialTest.java10
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));
+ }
+ }
}