diff options
-rw-r--r-- | src/test/java/org/bukkit/PerMaterialTest.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/java/org/bukkit/PerMaterialTest.java b/src/test/java/org/bukkit/PerMaterialTest.java index eabe68d7..1e8d53c6 100644 --- a/src/test/java/org/bukkit/PerMaterialTest.java +++ b/src/test/java/org/bukkit/PerMaterialTest.java @@ -162,4 +162,22 @@ public class PerMaterialTest extends AbstractTestingBase { assertFalse(EnchantmentTarget.BREAKABLE.includes(material)); } } + + @Test + public void testBlock() { + if (material == Material.AIR) { + assertTrue(material.isBlock()); + } else { + assertThat(material.isBlock(), is(equalTo(CraftMagicNumbers.getBlock(material) != Blocks.AIR))); + } + } + + @Test + public void testAir() { + if (material == Material.AIR) { + assertTrue(material.isItem()); + } else { + assertThat(material.isItem(), is(equalTo(CraftMagicNumbers.getItem(material) != null))); + } + } } |