Add isRecord and new material method tests.
Cleaned up all of the CraftBukkit tests, including moving some tests from MaterialTest to PerMaterialTest. By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package org.bukkit;
|
||||
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.server.AchievementList;
|
||||
@@ -17,7 +17,7 @@ import com.google.common.collect.Lists;
|
||||
public class AchievementTest {
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void verifyMapping() throws IllegalArgumentException, SecurityException, IllegalAccessException, NoSuchFieldException {
|
||||
public void verifyMapping() throws Throwable {
|
||||
List<Achievement> achievements = Lists.newArrayList(Achievement.values());
|
||||
|
||||
for (net.minecraft.server.Achievement statistic : (List<net.minecraft.server.Achievement>) AchievementList.e) {
|
||||
@@ -29,9 +29,9 @@ public class AchievementTest {
|
||||
Achievement subject = Achievement.getById(id);
|
||||
assertNotNull(message, subject);
|
||||
|
||||
achievements.remove(subject);
|
||||
assertTrue(name, achievements.remove(subject));
|
||||
}
|
||||
|
||||
assertThat("org.bukkit.Achievement has too many achievements", achievements, hasSize(0));
|
||||
assertThat("org.bukkit.Achievement has too many achievements", achievements, is(Collections.EMPTY_LIST));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user