mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
Add test for WorldType's
By: feildmaster <admin@feildmaster.com>
This commit is contained in:
parent
6e2987bb35
commit
fdfc871461
1 changed files with 31 additions and 0 deletions
31
paper-server/src/test/java/org/bukkit/WorldTypeTest.java
Normal file
31
paper-server/src/test/java/org/bukkit/WorldTypeTest.java
Normal file
|
@ -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!");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue