mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
@@ -15,8 +15,11 @@ public class MaterialTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getById() {
|
||||
public void getById() throws Throwable {
|
||||
for (Material material : Material.values()) {
|
||||
if (material.getClass().getField(material.name()).getAnnotation(Deprecated.class) != null) {
|
||||
continue;
|
||||
}
|
||||
assertThat(Material.getMaterial(material.getId()), is(material));
|
||||
}
|
||||
}
|
||||
@@ -56,8 +59,11 @@ public class MaterialTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void matchMaterialById() {
|
||||
public void matchMaterialById() throws Throwable {
|
||||
for (Material material : Material.values()) {
|
||||
if (material.getClass().getField(material.name()).getAnnotation(Deprecated.class) != null) {
|
||||
continue;
|
||||
}
|
||||
assertThat(Material.matchMaterial(String.valueOf(material.getId())), is(material));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user