Update Update Bukkit to 1.7.2

By: mbax <matt@phozop.net>
This commit is contained in:
Bukkit/Spigot
2013-11-13 17:53:49 -07:00
parent 1945a3b7ea
commit aa66c8025a
19 changed files with 327 additions and 205 deletions

View File

@@ -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]));
}
}

View File

@@ -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));
}
}

View File

@@ -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));
}
}
}