13
0
geforkt von Mirrors/Paper

Add test for WorldType's

Dieser Commit ist enthalten in:
feildmaster 2012-08-02 09:10:15 -05:00
Ursprung a43d621c01
Commit 764c3f24ee

Datei anzeigen

@ -0,0 +1,31 @@
package org.bukkit;
import static org.junit.Assert.fail;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.server.WorldType;
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!");
}
}
}