diff options
author | Wesley Wolfe <weswolf@aol.com> | 2012-12-14 02:02:02 -0600 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2012-12-14 02:02:02 -0600 |
commit | 0f4c206f9b256c441a142b0be68a4a76421c2911 (patch) | |
tree | 980ba23c5ac389461a518af3c69b12a4c9008214 /src/test/java/org/bukkit/WorldTypeTest.java | |
parent | 53b064ec79c62f34ca98dd08b0ae4cc04e51a81f (diff) | |
download | craftbukkit-0f4c206f9b256c441a142b0be68a4a76421c2911.tar craftbukkit-0f4c206f9b256c441a142b0be68a4a76421c2911.tar.gz craftbukkit-0f4c206f9b256c441a142b0be68a4a76421c2911.tar.lz craftbukkit-0f4c206f9b256c441a142b0be68a4a76421c2911.tar.xz craftbukkit-0f4c206f9b256c441a142b0be68a4a76421c2911.zip |
Add isRecord and new material method tests.
Cleaned up all of the CraftBukkit tests, including moving some tests
from MaterialTest to PerMaterialTest.
Diffstat (limited to 'src/test/java/org/bukkit/WorldTypeTest.java')
-rw-r--r-- | src/test/java/org/bukkit/WorldTypeTest.java | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/test/java/org/bukkit/WorldTypeTest.java b/src/test/java/org/bukkit/WorldTypeTest.java index 8d063ca5..154d0b49 100644 --- a/src/test/java/org/bukkit/WorldTypeTest.java +++ b/src/test/java/org/bukkit/WorldTypeTest.java @@ -1,9 +1,7 @@ package org.bukkit; -import static org.junit.Assert.fail; - -import java.util.ArrayList; -import java.util.List; +import static org.junit.Assert.*; +import static org.hamcrest.Matchers.*; import net.minecraft.server.WorldType; import org.junit.Test; @@ -11,21 +9,10 @@ import org.junit.Test; public class WorldTypeTest { @Test public void testTypes() { - List<WorldType> missingTypes = new ArrayList<WorldType>(); - for (WorldType type : WorldType.types) { if (type == null) continue; - if (org.bukkit.WorldType.getByName(type.name()) == null) { - missingTypes.add(type); - } - } - - if (!missingTypes.isEmpty()) { - for (WorldType type : missingTypes) { - System.out.println(type.name() + " is missing!"); - } - fail("Missing (" + missingTypes.size() + ") WorldTypes!"); + assertThat(type.name() + " has no Bukkit world", org.bukkit.WorldType.getByName(type.name()), is(not(nullValue()))); } } } |