mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
@@ -1,21 +0,0 @@
|
||||
package org.bukkit;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class AchievementTest {
|
||||
|
||||
@Test
|
||||
public void getById() {
|
||||
for (Achievement achievement : Achievement.values()) {
|
||||
assertThat(Achievement.getById(achievement.getId()), is(achievement));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getByOffset() {
|
||||
assertThat(Achievement.getById(Achievement.STATISTIC_OFFSET), is(Achievement.values()[0]));
|
||||
}
|
||||
}
|
@@ -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));
|
||||
}
|
||||
}
|
||||
|
@@ -1,15 +0,0 @@
|
||||
package org.bukkit;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class StatisticTest {
|
||||
@Test
|
||||
public void getById() {
|
||||
for (Statistic statistic : Statistic.values()) {
|
||||
assertThat(Statistic.getById(statistic.getId()), is(statistic));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user