Add Unit Tests for geHardness and getBlastResistance

This commit is contained in:
Christos Miniotis
2018-08-08 04:06:36 +03:00
committed by md_5
parent 53d3ac0a97
commit c4220dc24f
2 changed files with 23 additions and 0 deletions

View File

@@ -215,4 +215,18 @@ public class PerMaterialTest extends AbstractTestingBase {
assertFalse(material.isInteractable());
}
}
@Test
public void testBlockHardness() {
if (material.isBlock()) {
assertThat(material.getHardness(), is(CraftMagicNumbers.getBlock(material).strength));
}
}
@Test
public void testBlastResistance() {
if (material.isBlock()) {
assertThat(material.getBlastResistance(), is(CraftMagicNumbers.getBlock(material).k())); // PAIL getDurability
}
}
}